var theme_ajax_dir = theme_url + 'ajax/'; var theme_js_dir = theme_url + 'js/'; var tinymce_content_css_path = "/dpo/themes/_default/css/content.css"; jQuery.extend({ //dims the screen setTinyMCECSS: function(arg) { if (arg!=''){ if (arg.indexOf('\,')>-1){ css_path = arg.split('\,'); tinymce_content_css_path = ''; for(i=0;i0){ tinymce_content_css_path += ','; } tinymce_content_css_path += ''+css_path[i]; } }else{ tinymce_content_css_path = ''+arg; } } } , setTinyMCESiteFont: function(arg) { if (arg!='' && !isNaN(arg)){ if (tinymce_content_css_path!=''){ tinymce_content_css_path += ','; } tinymce_content_css_path += '/dpo/controlpanel/themes/cp/ajax/site/content/get_font_by_site.php?site='+arg; } } , loadTinyMCE: function(arg) { $('textarea.simple-tinymce').tinymce({ // Location of TinyMCE script script_url : theme_js_dir + 'tiny_mce/tiny_mce.js', // General options theme : "advanced", // Theme options theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,undo,redo,|,sub,sup", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, paste_use_dialog : true, paste_auto_cleanup_on_paste : true, extended_valid_elements: "div[*],script[language|type|src],iframe[*]", //strict_loading_mode: tinymce.isWebKit, // Example content CSS (should be your site CSS) content_css : tinymce_content_css_path, height : "200px", document_base_url : "http://www.dposite.com/" }); $('textarea.tinymce').tinymce({ // Location of TinyMCE script script_url : theme_js_dir + 'tiny_mce/tiny_mce.js', // General options theme : "advanced", plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,filemanager", // Theme options theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,code,|,forecolor,backcolor,filemanager,|,sub,sup", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, paste_use_dialog : true, paste_auto_cleanup_on_paste : true, extended_valid_elements: "div[*],script[language|type|src],iframe[*]", // Example content CSS (should be your site CSS) content_css : tinymce_content_css_path, //strict_loading_mode: tinymce.isWebKit, height : "400px", document_base_url : "http://www.dposite.com/" }); }, //dims the screen dimScreen: function(speed, opacity, callback) { if(jQuery('#__dimScreen').size() > 0) return; if(typeof speed == 'function') { callback = speed; speed = null; } if(typeof opacity == 'function') { callback = opacity; opacity = null; } if(speed < 1) { var placeholder = opacity; opacity = speed; speed = placeholder; } if(opacity >= 1) { var placeholder = speed; speed = opacity; opacity = placeholder; } speed = (speed > 0) ? speed : 500; opacity = (opacity > 0) ? opacity : 0.5; $('
').attr({ 'id': '__dimScreen' ,'fade_opacity': opacity ,'speed': speed }).css({ background: '#000' ,height: $(document).height() + 'px' ,left: '0px' ,opacity: 0 ,position: 'absolute' ,top: '0px' ,width: $(document).width() + 'px' ,zIndex: 999 }).appendTo('body').fadeTo(speed, opacity, callback); $('
').attr({ 'id': '__dimLoading' }).css({ 'top': ($(window).scrollTop()+100)+'px', 'left': ($(document).width()/2 - 300)+'px', 'width' : '600px', position: 'absolute', 'padding' : '50px', 'display' : 'block', zIndex: 1000, 'background-color': '#FFF' }).html('

Page Loading...

' ).appendTo('body'); return; }, //stops current dimming of the screen dimScreenStop: function(callback) { var x = jQuery('#__dimScreen'); var y = jQuery('#__dimLoading'); var opacity = x.attr('fade_opacity'); var speed = x.attr('speed'); x.fadeOut(speed, function() { x.remove(); if(typeof callback == 'function') callback(); }); y.fadeOut(speed, function() { y.remove(); if(typeof callback == 'function') callback(); }); } }); function doPageLoading(){ $.dimScreen(200, 0.3); } function endPageLoading(div){ $.dimScreenStop(); } function initNotificationBox(){ $(".close").click( function () { $(this).parent().fadeTo(400, 0, function () { // Links with the class "close" will close parent $(this).slideUp(400); }); return false; } ); }