diff --git a/e107_admin/image.php b/e107_admin/image.php index 8b22ccddd..445bfa49d 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -845,7 +845,8 @@ class media_admin_ui extends e_admin_ui $fl->setFileInfo('all'); $files = $fl->get_files(e_MEDIA."temp/"); - e107::getJs()->requireCoreLib('core/admin.js'); + e107::js('core','core/admin.js','prototype'); + // e107::getJs()->requireCoreLib('core/admin.js'); //TODO Detect XML file, and if found - read that instead of the directory. diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index ba7670b99..35aea440f 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -1213,7 +1213,10 @@ $text .= " ".pref_submit('javascript')." - - "; + + ","prototype"); diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index e03ee3ca8..fa300da88 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -3781,7 +3781,8 @@ class e_admin_ui extends e_admin_controller_ui */ function EditHeader() { - e107::getJs()->requireCoreLib('core/admin.js'); + // e107::getJs()->requireCoreLib('core/admin.js'); + e107::js('core','core/admin.js','prototype'); } /** @@ -3868,7 +3869,8 @@ class e_admin_ui extends e_admin_controller_ui function CreateHeader() { // TODO - invoke it on className (not all textarea elements) - e107::getJs()->requireCoreLib('core/admin.js'); + //e107::getJs()->requireCoreLib('core/admin.js'); + e107::js('core','core/admin.js','prototype'); } /** diff --git a/e107_themes/jayya/admin_theme.php b/e107_themes/jayya/admin_theme.php index 8b48535f6..33409acaf 100644 --- a/e107_themes/jayya/admin_theme.php +++ b/e107_themes/jayya/admin_theme.php @@ -97,6 +97,7 @@ e107::css('inline',"/******** Tabs JS */ e107::js('core', 'core/colorbox/jquery.colorbox-min.js', 'jquery', 2); e107::css('core', 'core/colorbox/colorbox.css', 'jquery'); +e107::js('core', 'core/jquery.elastic.source.js', 'jquery', 2); e107::js('inline',' @@ -109,19 +110,36 @@ e107::js('inline',' $(".e-hideme").toggle("slow"); }); + // Date $(function() { $( ".e-date" ).datepicker(); }); + // Tabs $(function() { $( "#tab-container" ).tabs(); }); + // Decorate $(".adminlist tr:even").addClass("even"); $(".adminlist tr:odd").addClass("odd"); $(".adminlist tr:first").addClass("first"); $(".adminlist tr:last").addClass("last"); + + // Character Counter + $("textarea").before("
"); + $("textarea").keyup(function(){ + + // var max=$(this).attr("maxlength"); + var max = 100; + var valLen=$(this).val().length; + $("#remainingCharacters").text( valLen + " characters") + }); + // Text-area AutoGrow + $("textarea.e-autoheight").elastic(); + + // Dialog $("a.e-dialog").colorbox({ iframe:true, width:"60%", @@ -133,6 +151,7 @@ e107::js('inline',' parent.$.colorbox.close() }); + // Sorting var fixHelper = function(e, ui) { ui.children().each(function() { $(this).width($(this).width()); @@ -161,6 +180,28 @@ e107::js('inline',' }).disableSelection(); + + + // Check-All + $("input.toggle-all").click(function(evt){ + if($(this).is(":checked")){ + $("input[type=\"checkbox\"].checkbox").attr("checked", "checked"); + } + else{ + $("input[type=\"checkbox\"].checkbox").removeAttr("checked"); + } + }); + + + // Basic Delete Confirmation + $("input.delete").click(function(){ + var answer = confirm($(this).attr("title")+ " ?"); + return answer // answer is a boolean + }); + + + + }) ','jquery');