Changeset 9586 for trunk/admin/themes


Ignore:
Timestamp:
Mar 9, 2011, 3:22:48 PM (14 years ago)
Author:
patdenice
Message:

feature:2114
Simplify all admin templates.

Location:
trunk/admin/themes/default/template
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/admin.tpl

    r9559 r9586  
    1 {combine_script id='jquery.ui' load='header' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' }
    2 {combine_script id='jquery.ui.accordion' load='header' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.accordion.min.js' }
    31{footer_script require='jquery.ui.accordion'}
    42jQuery(document).ready(function(){ldelim}
  • trunk/admin/themes/default/template/cat_list.tpl

    r9559 r9586  
    1 {combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' }
    2 {combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' }
    31{footer_script require='jquery.ui.sortable'}
    42jQuery(document).ready(function(){ldelim}
  • trunk/admin/themes/default/template/comments.tpl

    r8128 r9586  
    1 {literal}
    2 <script type="text/javascript">
    3 $(document).ready(function(){
    4   $(".checkComment").click(function(event) {
     1{footer_script}{literal}
     2jQuery(document).ready(function(){
     3  jQuery(".checkComment").click(function(event) {
    54    if (event.target.type !== 'checkbox') {
    6       var checkbox = $(this).children("input[type=checkbox]");
    7       $(checkbox).attr('checked', !$(checkbox).is(':checked'));
     5      var checkbox = jQuery(this).children("input[type=checkbox]");
     6      jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
    87    }
    98  });
    109
    11   $("#commentSelectAll").click(function () {
    12     $(".checkComment input[type=checkbox]").attr('checked', true);
     10  jQuery("#commentSelectAll").click(function () {
     11    jQuery(".checkComment input[type=checkbox]").attr('checked', true);
    1312    return false;
    1413  });
    1514
    16   $("#commentSelectNone").click(function () {
    17     $(".checkComment input[type=checkbox]").attr('checked', false);
     15  jQuery("#commentSelectNone").click(function () {
     16    jQuery(".checkComment input[type=checkbox]").attr('checked', false);
    1817    return false;
    1918  });
    2019
    21   $("#commentSelectInvert").click(function () {
    22     $(".checkComment input[type=checkbox]").each(function() {
    23       $(this).attr('checked', !$(this).is(':checked'));
     20  jQuery("#commentSelectInvert").click(function () {
     21    jQuery(".checkComment input[type=checkbox]").each(function() {
     22      jQuery(this).attr('checked', !$(this).is(':checked'));
    2423    });
    2524    return false;
     
    2726
    2827});
    29 </script>
    30 {/literal}
     28{/literal}{/footer_script}
    3129
    3230<div class="titrePage">
  • trunk/admin/themes/default/template/element_set_ranks.tpl

    r9559 r9586  
    1 {combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' }
    2 {combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' }
    31{footer_script require='jquery.ui.sortable'}{literal}
    42jQuery(document).ready(function() {
     
    1210  jQuery('ul.thumbnails').sortable( {
    1311    revert: true, opacity: 0.7,
    14     handle: $('.rank-of-image').add('.rank-of-image img'),
     12    handle: jQuery('.rank-of-image').add('.rank-of-image img'),
    1513    update: function() {
    16       $(this).find('li').each(function(i) {
    17         $(this).find("input[name^=rank_of_image]").each(function() {
    18           $(this).attr('value', (i+1)*10)
     14      jQuery(this).find('li').each(function(i) {
     15        jQuery(this).find("input[name^=rank_of_image]").each(function() {
     16          jQuery(this).attr('value', (i+1)*10)
    1917        });
    2018      });
    2119
    22       $('#image_order_rank').attr('checked', true);
     20      jQuery('#image_order_rank').attr('checked', true);
    2321      checkOrderOptions();
    2422    }
  • trunk/admin/themes/default/template/include/autosize.inc.tpl

    r8162 r9586  
    1 {combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
    21{combine_script id='jquery.autogrow' load='async' require='jquery' path='themes/default/js/plugins/jquery.autogrow-textarea.js'}
    32{* Auto size and auto grow textarea *}
  • trunk/admin/themes/default/template/include/datepicker.inc.tpl

    r9559 r9586  
    1 {combine_script id='jquery' load='footer' path='themes/default/js/jquery.min.js'}
    2 {combine_script id='jquery.ui' load='footer' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js'}
    3 {combine_script id='jquery.ui.datepicker' load='footer' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.datepicker.min.js'}
    41{combine_script id='datepicker.js' load='footer' require='jquery.ui.datepicker' path='themes/default/js/datepicker.js'}
    52
     
    129{combine_css path="themes/default/js/ui/theme/jquery.ui.datepicker.css"}
    1310
    14 {footer_script}
     11{footer_script require='jquery.ui.datepicker,datepicker.js'}
    1512function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date)
    1613{ldelim}
  • trunk/admin/themes/default/template/include/dbselect.inc.tpl

    r9559 r9586  
    1 {combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
    2 {combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' }
    3 {combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.resizable.min.js' }
    41{footer_script require='jquery.ui.resizable'}{literal}
    52jQuery(document).ready(function(){
  • trunk/admin/themes/default/template/include/resize.inc.tpl

    r9559 r9586  
    1 {combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'}
    2 {combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js'}
    3 {combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.resizable.min.js'}
    4 
    51{* Resize possible *}
    62{footer_script require='jquery.ui.resizable'}{literal}
  • trunk/admin/themes/default/template/include/tag_selection.inc.tpl

    r5931 r9586  
    1 {literal}
    2 <script type="text/javascript">
    3 $(document).ready(function(){
    4   $(".tagSelection label").click(function () {
    5     var parent = $(this).parent('li');
    6     var checkbox = $(this).children("input[type=checkbox]");
     1{footer_script require='jquery'}{literal}
     2jQuery(document).ready(function(){
     3  jQuery(".tagSelection label").click(function () {
     4    var parent = jQuery(this).parent('li');
     5    var checkbox = jQuery(this).children("input[type=checkbox]");
    76
    8     if ($(checkbox).is(':checked')) {
    9        $(parent).addClass("tagSelected");
     7    if (jQuery(checkbox).is(':checked')) {
     8      jQuery(parent).addClass("tagSelected");
    109    }
    1110    else {
    12        $(parent).removeClass('tagSelected');
     11      jQuery(parent).removeClass('tagSelected');
    1312    }
    1413  });
    1514});
    16 </script>
    17 {/literal}
     15{/literal}{/footer_script}
  • trunk/admin/themes/default/template/languages_update.tpl

    r9559 r9586  
    1 {combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' }
    2 {combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' }
    3 
    4 {footer_script require='jquery.effects.blind'}
    5 jQuery(document).ready(function(){ldelim}
    6         jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {ldelim}
     1{footer_script require='jquery.effects.blind'}{literal}
     2jQuery(document).ready(function(){
     3        jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {
    74                id = this.id.split('_');
    85                jQuery("#revdesc_"+id[1]).toggle('blind');
     
    118        });
    129});
    13 {/footer_script}
     10{/literal}{/footer_script}
    1411
    1512<div class="titrePage">
  • trunk/admin/themes/default/template/menubar.tpl

    r9559 r9586  
    1 {combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' }
    2 {combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' }
    3 {footer_script require='jquery.ui.sortable'}
    4 jQuery(document).ready(function(){ldelim}
     1{footer_script require='jquery.ui.sortable'}{literal}
     2jQuery(document).ready(function(){
    53        jQuery(".menuPos").hide();
    64        jQuery(".drag_button").show();
    75        jQuery(".menuLi").css("cursor","move");
    8         jQuery(".menuUl").sortable({ldelim}
     6        jQuery(".menuUl").sortable({
    97                axis: "y",
    108                opacity: 0.8
    119        });
    12         jQuery("input[name^='hide_']").click(function() {ldelim}
     10        jQuery("input[name^='hide_']").click(function() {
    1311                men = this.name.split('hide_');
    14                 if (this.checked) {ldelim}
     12                if (this.checked) {
    1513                        jQuery("#menu_"+men[1]).addClass('menuLi_hidden');
    16                 } else {ldelim}
     14                } else {
    1715                        jQuery("#menu_"+men[1]).removeClass('menuLi_hidden');
    1816                }
    1917        });
    20         jQuery("#menuOrdering").submit(function(){ldelim}
     18        jQuery("#menuOrdering").submit(function(){
    2119                ar = jQuery('.menuUl').sortable('toArray');
    22                 for(i=0;i<ar.length;i++) {ldelim}
     20                for(i=0;i<ar.length;i++) {
    2321                        men = ar[i].split('menu_');
    2422                        document.getElementsByName('pos_' + men[1])[0].value = i+1;
     
    2624        });
    2725});
    28 {/footer_script}
     26{/literal}{/footer_script}
    2927
    3028<div class="titrePage">
  • trunk/admin/themes/default/template/notification_by_mail.tpl

    r8682 r9586  
    11
    22{include file='include/autosize.inc.tpl'}
    3 {literal}
    4 <script type="text/javascript">
     3{footer_script}{literal}
    54jQuery(document).ready(function(){
    65
     
    1615
    1716});
    18 </script>
    19 {/literal}
     17{/literal}{/footer_script}
    2018
    2119<div class="titrePage">
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r8682 r9586  
     1{if $upload_mode eq 'multiple'}
    12{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' }
    2 
    3 {if $upload_mode eq 'multiple'}
    4 <script type="text/javascript" src="{$uploadify_path}/swfobject.js"></script>
     3{combine_script id='swfobject' load='footer' path='admin/include/uploadify/swfobject.js'}
    54{combine_script id='jquery.uploadify' load='footer' require='jquery' path='admin/include/uploadify/jquery.uploadify.v2.1.0.min.js' }
     5{combine_css path="admin/themes/default/uploadify.jGrowl.css"}
     6{combine_css path="admin/include/uploadify/uploadify.css"}
    67{/if}
    7 {html_head}
    8 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/default/uploadify.jGrowl.css">
    9 {/html_head}
    108
    119{footer_script}{literal}
     
    1311  function checkUploadStart() {
    1412    var nbErrors = 0;
    15     $("#formErrors").hide();
    16     $("#formErrors li").hide();
    17 
    18     if ($("input[name=category_type]:checked").val() == "new" && $("input[name=category_name]").val() == "") {
    19       $("#formErrors #emptyCategoryName").show();
     13    jQuery("#formErrors").hide();
     14    jQuery("#formErrors li").hide();
     15
     16    if (jQuery("input[name=category_type]:checked").val() == "new" && jQuery("input[name=category_name]").val() == "") {
     17      jQuery("#formErrors #emptyCategoryName").show();
    2018      nbErrors++;
    2119    }
    2220
    2321    var nbFiles = 0;
    24     if ($("#uploadBoxes").size() == 1) {
    25       $("input[name^=image_upload]").each(function() {
    26         if ($(this).val() != "") {
     22    if (jQuery("#uploadBoxes").size() == 1) {
     23      jQuery("input[name^=image_upload]").each(function() {
     24        if (jQuery(this).val() != "") {
    2725          nbFiles++;
    2826        }
     
    3028    }
    3129    else {
    32       nbFiles = $(".uploadifyQueueItem").size();
     30      nbFiles = jQuery(".uploadifyQueueItem").size();
    3331    }
    3432
    3533    if (nbFiles == 0) {
    36       $("#formErrors #noPhoto").show();
     34      jQuery("#formErrors #noPhoto").show();
    3735      nbErrors++;
    3836    }
    3937
    4038    if (nbErrors != 0) {
    41       $("#formErrors").show();
     39      jQuery("#formErrors").show();
    4240      return false;
    4341    }
     
    6866  }
    6967
    70   if ($("select[name=category] option").length == 0) {
    71     $('input[name=category_type][value=existing]').attr('disabled', true);
    72     $('input[name=category_type]').attr('checked', false);
    73     $('input[name=category_type][value=new]').attr('checked', true);
     68  if (jQuery("select[name=category] option").length == 0) {
     69    jQuery('input[name=category_type][value=existing]').attr('disabled', true);
     70    jQuery('input[name=category_type]').attr('checked', false);
     71    jQuery('input[name=category_type][value=new]').attr('checked', true);
    7472  }
    7573
    76   $("input[name=category_type]").click(function () {
    77     $("[id^=category_type_]").hide();
    78     $("#category_type_"+$(this).attr("value")).show();
    79   });
    80 
    81   $("#hideErrors").click(function() {
    82     $("#formErrors").hide();
     74  jQuery("input[name=category_type]").click(function () {
     75    jQuery("[id^=category_type_]").hide();
     76    jQuery("#category_type_"+jQuery(this).attr("value")).show();
     77  });
     78
     79  jQuery("#hideErrors").click(function() {
     80    jQuery("#formErrors").hide();
    8381    return false;
    8482  });
     
    8987  function addUploadBox() {
    9088    var uploadBox = '<p class="file"><input type="file" size="60" name="image_upload[]"></p>';
    91     $(uploadBox).appendTo("#uploadBoxes");
     89    jQuery(uploadBox).appendTo("#uploadBoxes");
    9290  }
    9391
    9492  addUploadBox();
    9593
    96   $("#addUploadBox A").click(function () {
     94  jQuery("#addUploadBox A").click(function () {
    9795    addUploadBox();
    9896  });
    9997
    100   $("#uploadForm").submit(function() {
     98  jQuery("#uploadForm").submit(function() {
    10199    return checkUploadStart();
    102100  });
     
    134132      }
    135133      else {
    136         $("input[name=submit_upload]").click();
     134        jQuery("input[name=submit_upload]").click();
    137135      }
    138136    },
     
    158156      }
    159157
    160       $.jGrowl(
     158      jQuery.jGrowl(
    161159        '<p></p>'+msg,
    162160        {
     
    167165      );
    168166
    169       $("#fileUploadgrowl" + queueID).fadeOut(
     167      jQuery("#fileUploadgrowl" + queueID).fadeOut(
    170168        250,
    171169        function() {
    172           $("#fileUploadgrowl" + queueID).remove()
     170          jQuery("#fileUploadgrowl" + queueID).remove()
    173171        }
    174172      );
     
    177175    onCancel: function (a, b, c, d) {
    178176      var msg = "Cancelled uploading: "+c.name;
    179       $.jGrowl(
     177      jQuery.jGrowl(
    180178        '<p></p>'+msg,
    181179        {
     
    189187    onClearQueue: function (a, b) {
    190188      var msg = "Cleared "+b.fileCount+" files from queue";
    191       $.jGrowl(
     189      jQuery.jGrowl(
    192190        '<p></p>'+msg,
    193191        {
     
    201199    onComplete: function (a, b ,c, d, e) {
    202200      var size = Math.round(c.size/1024);
    203       $.jGrowl(
     201      jQuery.jGrowl(
    204202        '<p></p>'+c.name+' - '+size+'KB',
    205203        {
     
    213211  });
    214212
    215   $("input[type=button]").click(function() {
     213  jQuery("input[type=button]").click(function() {
    216214    if (!checkUploadStart()) {
    217215      return false;
    218216    }
    219217
    220     $("#uploadify").uploadifyUpload();
     218    jQuery("#uploadify").uploadifyUpload();
    221219  });
    222220
  • trunk/admin/themes/default/template/photos_add_ploader.tpl

    r6363 r9586  
    1 {html_head}
    2 {literal}
    3 <script type="text/javascript">
    4 $().ready(function(){
    5   $("#pLoaderPage  img").fadeTo("fast", 0.6);
     1{footer_script}{literal}
     2jQuery().ready(function(){
     3  jQuery("#pLoaderPage  img").fadeTo("fast", 0.6);
    64
    7   $("#pLoaderPage  img").hover(
     5  jQuery("#pLoaderPage  img").hover(
    86    function(){
    9       $(this).fadeTo("fast", 1.0); // Opacity on hover
     7      jQuery(this).fadeTo("fast", 1.0); // Opacity on hover
    108    },
    119    function(){
    12       $(this).fadeTo("fast", 0.6); // Opacity on mouseout
     10      jQuery(this).fadeTo("fast", 0.6); // Opacity on mouseout
    1311    }
    1412  );
    1513});
    16 </script>
     14{/literal}{/footer_script}
    1715
     16{html_head}{literal}
    1817<style type="text/css">
    1918#pLoaderPage {
     
    4746}
    4847</style>
    49 {/literal}
    50 {/html_head}
     48{/literal}{/html_head}
    5149
    5250<div class="titrePage">
  • trunk/admin/themes/default/template/photos_add_settings.tpl

    r8227 r9586  
    1 {literal}
    2 <script type="text/javascript">
    3 $(document).ready(function(){
     1{footer_script}{literal}
     2jQuery(document).ready(function(){
    43  function toggleResizeFields(prefix) {
    5     var checkbox = $("#"+prefix+"_resize");
    6     var needToggle = $("input[name^="+prefix+"_]").not(checkbox).not($("#hd_keep")).parents('tr');
     4    var checkbox = jQuery("#"+prefix+"_resize");
     5    var needToggle = jQuery("input[name^="+prefix+"_]").not(checkbox).not(jQuery("#hd_keep")).parents('tr');
    76
    87
    9     if ($(checkbox).is(':checked')) {
     8    if (jQuery(checkbox).is(':checked')) {
    109      needToggle.show();
    1110
    1211      if (prefix == "websize") {
    13         $("#hd_keep").parents("fieldset").show();
     12        jQuery("#hd_keep").parents("fieldset").show();
    1413      }
    1514    }
     
    1817
    1918      if (prefix == "websize") {
    20         $("#hd_keep").parents("fieldset").hide();
     19        jQuery("#hd_keep").parents("fieldset").hide();
    2120      }
    2221    }
     
    2423
    2524  toggleResizeFields("websize");
    26   $("#websize_resize").click(function () {toggleResizeFields("websize")});
     25  jQuery("#websize_resize").click(function () {toggleResizeFields("websize")});
    2726
    2827  toggleResizeFields("hd");
    29   $("#hd_resize").click(function () {toggleResizeFields("hd")});
     28  jQuery("#hd_resize").click(function () {toggleResizeFields("hd")});
    3029
    3130  function toggleHdFields() {
    32     var checkbox = $("#hd_keep");
    33     var needToggle = $("input[name^=hd_]").not(checkbox).parents('tr');
     31    var checkbox = jQuery("#hd_keep");
     32    var needToggle = jQuery("input[name^=hd_]").not(checkbox).parents('tr');
    3433
    35     if ($(checkbox).is(':checked')) {
     34    if (jQuery(checkbox).is(':checked')) {
    3635      needToggle.show();
    3736      toggleResizeFields("hd");
     
    4342
    4443  toggleHdFields();
    45   $("#hd_keep").click(function () {toggleHdFields()});
     44  jQuery("#hd_keep").click(function () {toggleHdFields()});
    4645});
    47 </script>
    48 {/literal}
     46{/literal}{/footer_script}
    4947
    5048<div class="titrePage">
  • trunk/admin/themes/default/template/plugins_new.tpl

    r9559 r9586  
    1 {combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' }
    2 {combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' }
    3 
    4 {footer_script require='jquery.effects.blind'}
    5 jQuery(document).ready(function(){ldelim}
    6         jQuery("td[id^='desc_']").click(function() {ldelim}
     1{footer_script require='jquery.effects.blind'}{literal}
     2jQuery(document).ready(function(){
     3        jQuery("td[id^='desc_']").click(function() {
    74                id = this.id.split('_');
    85                nb_lines = jQuery("#bigdesc_"+id[1]).html().split('<br>').length;
    96
    107                jQuery("#smalldesc_"+id[1]).toggle('blind', 1);
    11                 if (jQuery(this).hasClass('bigdesc')) {ldelim}
     8                if (jQuery(this).hasClass('bigdesc')) {
    129                        jQuery("#bigdesc_"+id[1]).toggle('blind', 1);
    13                 } else {ldelim}
     10                } else {
    1411                        jQuery("#bigdesc_"+id[1]).toggle('blind', 50 + (nb_lines * 30));
    1512                }
     
    1815        });
    1916});
    20 {/footer_script}
     17{/literal}{/footer_script}
    2118
    2219<div class="titrePage">
  • trunk/admin/themes/default/template/plugins_update.tpl

    r9559 r9586  
    1 {combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' }
    2 {combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' }
    3 
    4 {footer_script require='jquery.effects.blind'}
    5 jQuery(document).ready(function(){ldelim}
    6         jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {ldelim}
     1{footer_script require='jquery.effects.blind'}{literal}
     2jQuery(document).ready(function(){
     3        jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {
    74                id = this.id.split('_');
    85                jQuery("#revdesc_"+id[1]).toggle('blind');
     
    118        });
    129});
    13 {/footer_script}
     10{/literal}{/footer_script}
    1411
    1512<div class="titrePage">
  • trunk/admin/themes/default/template/themes_update.tpl

    r9559 r9586  
    1 {combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' }
    2 {combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' }
    3 
    4 {footer_script require='jquery.effects.blind'}
     1{footer_script require='jquery.effects.blind'}{literal}
    52jQuery(document).ready(function(){ldelim}
    63        jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {ldelim}
     
    118        });
    129});
    13 {/footer_script}
     10{/literal}{/footer_script}
    1411
    1512<div class="titrePage">
Note: See TracChangeset for help on using the changeset viewer.