Changeset 2764


Ignore:
Timestamp:
09/03/10 22:54:19 (17 months ago)
Author:
mattlevine
Message:
  1. Adding ckeditor to the frontend.
Location:
branches/5.2.1/www/default
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2.1/www/default/includes/display_objects/datacollection/index.cfm

    r2007 r2764  
    77Mura CMS is distributed in the hope that it will be useful, 
    88but WITHOUT ANY WARRANTY; without even the implied warranty of 
    9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ᅵSee the 
    1010GNU General Public License for more details. 
    1111 
    1212You should have received a copy of the GNU General Public License 
    13 along with Mura CMS.  If not, see <http://www.gnu.org/licenses/>. 
     13along with Mura CMS. ᅵIf not, see <http://www.gnu.org/licenses/>. 
    1414 
    1515Linking Mura CMS statically or dynamically with other modules constitutes 
    1616the preparation of a derivative work based on Mura CMS. Thus, the terms and      
    17 conditions of the GNU General Public License version 2 (“GPL”) cover the entire combined work. 
     17conditions of the GNU General Public License version 2 (ᅵGPLᅵ) cover the entire combined work. 
    1818 
    1919However, as a special exception, the copyright holders of Mura CMS grant you permission 
    2020to combine Mura CMS with programs or libraries that are released under the GNU Lesser General Public License version 2.1. 
    2121 
    22 In addition, as a special exception,  the copyright holders of Mura CMS grant you permission 
    23 to combine Mura CMS  with independent software modules that communicate with Mura CMS solely 
     22In addition, as a special exception, ᅵthe copyright holders of Mura CMS grant you permission 
     23to combine Mura CMS ᅵwith independent software modules that communicate with Mura CMS solely 
    2424through modules packaged as Mura CMS plugins and deployed through the Mura CMS plugin installation API, 
    25 provided that these modules (a) may only modify the  /trunk/www/plugins/ directory through the Mura CMS 
     25provided that these modules (a) may only modify the ᅵ/trunk/www/plugins/ directory through the Mura CMS 
    2626plugin installation API, (b) must not alter any default objects in the Mura CMS database 
    2727and (c) must not alter any files in the following directories except in cases where the code contains 
     
    3838For clarity, if you create a modified version of Mura CMS, you are not obligated to grant this special exception 
    3939for your modified version; it is your choice whether to do so, or to make such modified version available under 
    40 the GNU General Public License version 2  without this exception.  You may, if you choose, apply this exception 
     40the GNU General Public License version 2 ᅵwithout this exception. ᅵYou may, if you choose, apply this exception 
    4141to your own modified versions of Mura CMS. 
    4242---> 
     
    118118        <cfinclude template="dsp_response.cfm"> 
    119119        <cfelse> 
    120         <cfset addToHTMLHeadQueue("fckeditor.cfm")> 
     120        <cfset addToHTMLHeadQueue("htmlEditor.cfm")> 
    121121        #setDynamicContent(application.dataCollectionManager.renderForm(rsForm.contentid,request.siteid,rsForm.body,rsForm.responseChart))# 
    122122        <script type="text/javascript"> 
  • branches/5.2.1/www/default/includes/display_objects/dsp_edit_profile.cfm

    r2215 r2764  
    77Mura CMS is distributed in the hope that it will be useful, 
    88but WITHOUT ANY WARRANTY; without even the implied warranty of 
    9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ᅵSee the 
    1010GNU General Public License for more details. 
    1111 
    1212You should have received a copy of the GNU General Public License 
    13 along with Mura CMS.  If not, see <http://www.gnu.org/licenses/>. 
     13along with Mura CMS. ᅵIf not, see <http://www.gnu.org/licenses/>. 
    1414 
    1515Linking Mura CMS statically or dynamically with other modules constitutes 
    1616the preparation of a derivative work based on Mura CMS. Thus, the terms and      
    17 conditions of the GNU General Public License version 2 (“GPL”) cover the entire combined work. 
     17conditions of the GNU General Public License version 2 (ᅵGPLᅵ) cover the entire combined work. 
    1818 
    1919However, as a special exception, the copyright holders of Mura CMS grant you permission 
    2020to combine Mura CMS with programs or libraries that are released under the GNU Lesser General Public License version 2.1. 
    2121 
    22 In addition, as a special exception,  the copyright holders of Mura CMS grant you permission 
    23 to combine Mura CMS  with independent software modules that communicate with Mura CMS solely 
     22In addition, as a special exception, ᅵthe copyright holders of Mura CMS grant you permission 
     23to combine Mura CMS ᅵwith independent software modules that communicate with Mura CMS solely 
    2424through modules packaged as Mura CMS plugins and deployed through the Mura CMS plugin installation API, 
    25 provided that these modules (a) may only modify the  /trunk/www/plugins/ directory through the Mura CMS 
     25provided that these modules (a) may only modify the ᅵ/trunk/www/plugins/ directory through the Mura CMS 
    2626plugin installation API, (b) must not alter any default objects in the Mura CMS database 
    2727and (c) must not alter any files in the following directories except in cases where the code contains 
     
    3838For clarity, if you create a modified version of Mura CMS, you are not obligated to grant this special exception 
    3939for your modified version; it is your choice whether to do so, or to make such modified version available under 
    40 the GNU General Public License version 2  without this exception.  You may, if you choose, apply this exception 
     40the GNU General Public License version 2 ᅵwithout this exception. ᅵYou may, if you choose, apply this exception 
    4141to your own modified versions of Mura CMS. 
    4242---> 
     
    4949<cfparam name="msg" default="#rbFactory.getKey('user.message')#"> 
    5050<cfparam name="request.categoryID" default=""> 
    51 <cfset addToHTMLHeadQueue("fckeditor.cfm")> 
     51<cfset addToHTMLHeadQueue("htmlEditor.cfm")> 
    5252</cfsilent> 
    5353<cfoutput> 
  • branches/5.2.1/www/default/includes/display_objects/htmlhead/global.cfm

    r1102 r2764  
    77Mura CMS is distributed in the hope that it will be useful, 
    88but WITHOUT ANY WARRANTY; without even the implied warranty of 
    9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ᅵSee the 
    1010GNU General Public License for more details. 
    1111 
    1212You should have received a copy of the GNU General Public License 
    13 along with Mura CMS.  If not, see <http://www.gnu.org/licenses/>. 
     13along with Mura CMS. ᅵIf not, see <http://www.gnu.org/licenses/>. 
    1414 
    1515Linking Mura CMS statically or dynamically with other modules constitutes 
    1616the preparation of a derivative work based on Mura CMS. Thus, the terms and      
    17 conditions of the GNU General Public License version 2 (“GPL”) cover the entire combined work. 
     17conditions of the GNU General Public License version 2 (ᅵGPLᅵ) cover the entire combined work. 
    1818 
    1919However, as a special exception, the copyright holders of Mura CMS grant you permission 
    2020to combine Mura CMS with programs or libraries that are released under the GNU Lesser General Public License version 2.1. 
    2121 
    22 In addition, as a special exception,  the copyright holders of Mura CMS grant you permission 
    23 to combine Mura CMS  with independent software modules that communicate with Mura CMS solely 
     22In addition, as a special exception, ᅵthe copyright holders of Mura CMS grant you permission 
     23to combine Mura CMS ᅵwith independent software modules that communicate with Mura CMS solely 
    2424through modules packaged as Mura CMS plugins and deployed through the Mura CMS plugin installation API, 
    25 provided that these modules (a) may only modify the  /trunk/www/plugins/ directory through the Mura CMS 
     25provided that these modules (a) may only modify the ᅵ/trunk/www/plugins/ directory through the Mura CMS 
    2626plugin installation API, (b) must not alter any default objects in the Mura CMS database 
    2727and (c) must not alter any files in the following directories except in cases where the code contains 
     
    3838For clarity, if you create a modified version of Mura CMS, you are not obligated to grant this special exception 
    3939for your modified version; it is your choice whether to do so, or to make such modified version available under 
    40 the GNU General Public License version 2  without this exception.  You may, if you choose, apply this exception 
     40the GNU General Public License version 2 ᅵwithout this exception. ᅵYou may, if you choose, apply this exception 
    4141to your own modified versions of Mura CMS. 
    4242---> 
     
    6161var assetpath="#event.getSite().getAssetPath()#"; 
    6262var themepath="#event.getSite().getThemeAssetPath()#"; 
     63var htmlEditorType='#application.configBean.getValue("htmlEditorType")#'; 
     64var rb='#lcase(session.rb)#'; 
    6365</script> 
    6466</cfoutput> 
  • branches/5.2.1/www/default/js/global.js

    r2503 r2764  
    664664        for (i = 0; i < allPageTags.length; i++) { 
    665665                if (allPageTags[i].className == "htmlEditor") { 
    666                         var oFCKeditor = new FCKeditor(allPageTags[i].id); 
    667                         oFCKeditor.ToolbarSet                   = "htmlEditor"; 
    668                         oFCKeditor.Config.EditorAreaCSS = themepath + '/css/editor.css'; 
    669                         oFCKeditor.Config.StylesXmlPath = themepath + '/css/fckstyles.xml'; 
    670                         oFCKeditor.BasePath = context + '/wysiwyg/'; 
    671                         oFCKeditor.Height = height; 
    672                         oFCKeditor.Width = width; 
    673                         oFCKeditor.Config.ImageBrowser=false; 
    674                         oFCKeditor.Config.ImageUpload=false; 
    675                         oFCKeditor.Config.ForcePasteAsPlainText = true; 
    676                         oFCKeditor.Config.StartupFocus = false; 
    677                         oFCKeditor.ReplaceTextarea(); 
    678                         editors.push(oFCKeditor); 
    679                 } 
    680         } 
    681 } 
     666                        if (htmlEditorType=='fckeditor') { 
     667                                var oFCKeditor = new FCKeditor(allPageTags[i].id); 
     668                                oFCKeditor.ToolbarSet                   = "htmlEditor"; 
     669                                oFCKeditor.Config.EditorAreaCSS = themepath + '/css/editor.css'; 
     670                                oFCKeditor.Config.StylesXmlPath = themepath + '/css/fckstyles.xml'; 
     671                                oFCKeditor.BasePath = context + '/wysiwyg/'; 
     672                                oFCKeditor.Height = height; 
     673                                oFCKeditor.Width = width; 
     674                                oFCKeditor.Config.ImageBrowser=false; 
     675                                oFCKeditor.Config.ImageUpload=false; 
     676                                oFCKeditor.Config.ForcePasteAsPlainText = true; 
     677                                oFCKeditor.Config.StartupFocus = false; 
     678                                oFCKeditor.ReplaceTextarea(); 
     679                                editors.push(oFCKeditor); 
     680                        } else { 
     681                                var instance=CKEDITOR.instances[allPageTags[i].id]; 
     682                                if (instance) { 
     683                                        CKEDITOR.remove(instance); 
     684                                }  
     685                                 
     686                                if(jQuery('#' + allPageTags[i].id).html() == ''){ 
     687                                        jQuery('#' + allPageTags[i].id).html("<p></p>") 
     688                                } 
     689                                 
     690                                jQuery('#' + allPageTags[i].id).ckeditor(getHTMLEditorConfig(),htmlEditorOnComplete); 
     691                                         
     692                        } 
     693                } 
     694        } 
     695} 
     696 
     697var HTMLEditorLoadCount=0; 
     698 
     699function htmlEditorOnComplete( editorInstance ) {        
     700         
     701        if( htmlEditorType=='fckeditor'){ 
     702                editorInstance.ResetIsDirty(); 
     703                var totalIntances=FCKeditorAPI.Instances; 
     704        }else{ 
     705                var instance=jQuery(editorInstance).ckeditorGet(); 
     706                instance.resetDirty(); 
     707                var totalIntances=CKEDITOR.instances; 
     708                //CKFinder.setupCKEditor( instance, { basePath : context + '/tasks/widgets/ckfinder/', rememberLastFolder : false } ) ; 
     709        } 
     710         
     711        HTMLEditorLoadCount++; 
     712     
     713    var count = 0; 
     714 
     715    for (k in totalIntances){ count++ } 
     716 
     717    if (HTMLEditorLoadCount >= count ) { 
     718        document.getElementById("actionButtons").style.display="block";  
     719    } else { 
     720        document.getElementById("actionButtons").style.display="none"; 
     721        } 
     722  
     723} 
     724 
     725function getHTMLEditorConfig() { 
     726        var htmlEditorConfig={ 
     727                toolbar:'Default', 
     728                contentsCss: themeAssetPath + '/css/editor.css', 
     729                defaultLanguage: rb 
     730                } 
     731        return htmlEditorConfig; 
     732        } 
    682733 
    683734addLoadEvent(setKeyCheck); 
Note: See TracChangeset for help on using the changeset viewer.