Changeset 80545d in indico


Ignore:
Timestamp:
06/24/11 14:31:51 (2 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
84a01a
Parents:
0e0d7e
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (06/17/11 17:28:38)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (06/24/11 14:31:51)
Message:

[REF] Use $ instead of $j for jQuery

Files:
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • etc/js/jquery.cfg

    r86d723 r80545d  
    44    underscore.js 
    55        jquery.js 
    6         jquery-compat.js 
    76        jquery-ui.js 
    87        jquery.custom.js 
  • indico/MaKaC/webinterface/pages/base.py

    r86d723 r80545d  
    5454    def _includeJQuery(self): 
    5555        info = HelperMaKaCInfo().getMaKaCInfoInstance() 
    56         files = ['underscore', 'jquery', 'jquery-compat', 'jquery-ui', 'jquery.custom', 'jquery.daterange'] 
     56        files = ['underscore', 'jquery', 'jquery-ui', 'jquery.custom', 'jquery.daterange'] 
    5757        if info.isDebugActive(): 
    5858            # We can't use Loader.js as jQuery is included before any indico js 
  • indico/MaKaC/webinterface/tpls/ConfModifBadgeDesign.tpl

    r0ca8eb r80545d  
    8686        itemId++; 
    8787 
    88         var newDiv = $j('<div/>', { 
     88        var newDiv = $('<div/>', { 
    8989            id: itemId 
    9090        }).css({ 
     
    118118        var newDiv = createDiv(); 
    119119        // We set the inner html of the div depending on the type of item inserted 
    120         switch($j('#elementList').val()) { 
     120        switch($('#elementList').val()) { 
    121121            ${ switchCases } 
    122122        } 
     
    133133            items[lastSelectedDiv.attr('id')] = false; 
    134134            lastSelectedDiv.remove(); 
    135             $j('#selection_text').html(''); 
     135            $('#selection_text').html(''); 
    136136            lastSelectedDiv = null; 
    137             $j('#removeButton').prop('disabled', true); 
     137            $('#removeButton').prop('disabled', true); 
    138138        } 
    139139    } 
     
    142142        // Change the text that says which item is selected 
    143143        var id = newSelectedDiv.attr('id'); 
    144         $j('#selection_text').html(translate[items[id].key]); 
     144        $('#selection_text').html(translate[items[id].key]); 
    145145 
    146146        // TODO: add check to see if there's a table inside and not an image 
     
    157157        newSelectedDiv.html(newSelectedItem.toHTML()); 
    158158        lastSelectedDiv = newSelectedDiv; 
    159         $j('#removeButton').prop('disabled', false); 
     159        $('#removeButton').prop('disabled', false); 
    160160 
    161161        // Change the selectors so that they match the properties of the item 
    162         $j('#alignment_selector').prop('selectedIndex', newSelectedItem.textAlignIndex); 
    163         $j('#font_selector').prop('selectedIndex', newSelectedItem.fontFamilyIndex); 
    164         $j('#size_selector').prop('selectedIndex', newSelectedItem.fontSizeIndex); 
    165         $j('#style_selector').prop('selectedIndex', newSelectedItem.styleIndex); 
    166         $j('#color_selector').prop('selectedIndex', newSelectedItem.colorIndex); 
    167         $j('#width_field').val(newSelectedItem.width / pixelsPerCm); 
     162        $('#alignment_selector').prop('selectedIndex', newSelectedItem.textAlignIndex); 
     163        $('#font_selector').prop('selectedIndex', newSelectedItem.fontFamilyIndex); 
     164        $('#size_selector').prop('selectedIndex', newSelectedItem.fontSizeIndex); 
     165        $('#style_selector').prop('selectedIndex', newSelectedItem.styleIndex); 
     166        $('#color_selector').prop('selectedIndex', newSelectedItem.colorIndex); 
     167        $('#width_field').val(newSelectedItem.width / pixelsPerCm); 
    168168        if (newSelectedItem.key == "Fixed Text") { 
    169             $j('#fixed_text_field').val(newSelectedItem.text).prop('disabled', false); 
    170             $j('#changeText').prop('disabled', false); 
     169            $('#fixed_text_field').val(newSelectedItem.text).prop('disabled', false); 
     170            $('#changeText').prop('disabled', false); 
    171171        } else { 
    172             $j('#fixed_text_field').val("").prop('disabled', true); 
    173             $j('#changeText').prop('disabled', true); 
     172            $('#fixed_text_field').val("").prop('disabled', true); 
     173            $('#changeText').prop('disabled', true); 
    174174        } 
    175175    } 
     
    177177    function updateRulers() { 
    178178        if (templateDimensions.width > previousTemplateDimensions.width) { 
    179             var hRuler = $j('#horizontal_ruler'); 
     179            var hRuler = $('#horizontal_ruler'); 
    180180            for (var i = Math.ceil(previousTemplateDimensions.width / pixelsPerCm); i < Math.ceil(templateDimensions.width / pixelsPerCm); i++) { 
    181                 $j('<td/>', { 
     181                $('<td/>', { 
    182182                    id: 'rulerh' + i 
    183183                }).html('<img src="${ baseURL }/images/ruler/rulerh' + i + '.png" align="center"/>').appendTo(hRuler); 
     
    186186        else if (templateDimensions.width < previousTemplateDimensions.width) { 
    187187            for (var i = Math.ceil(previousTemplateDimensions.width / pixelsPerCm); i > Math.ceil(templateDimensions.width / pixelsPerCm); i--) { 
    188                 $j('#rulerh' + (i - 1)).remove(); 
     188                $('#rulerh' + (i - 1)).remove(); 
    189189            } 
    190190        } 
    191191 
    192192        if (templateDimensions.height > previousTemplateDimensions.height) { 
    193             var vRuler = $j('#vertical_ruler'); 
     193            var vRuler = $('#vertical_ruler'); 
    194194            for (var i = Math.ceil(previousTemplateDimensions.height / pixelsPerCm); i < Math.ceil(templateDimensions.height / pixelsPerCm); i++) { 
    195                 $j('<tr/>', { 
     195                $('<tr/>', { 
    196196                    id: 'rulerv' + i 
    197197                }).append('<td><img src="${ baseURL }//images/ruler/rulerv' + i + '.png" align="center"/></td>').appendTo(vRuler); 
     
    200200        else if (templateDimensions.height < previousTemplateDimensions.height) { 
    201201            for (i = Math.ceil(previousTemplateDimensions.height / pixelsPerCm); i > Math.ceil(templateDimensions.height / pixelsPerCm); i--) { 
    202                 $j('#rulerv' + (i - 1)).remove(); 
     202                $('#rulerv' + (i - 1)).remove(); 
    203203            } 
    204204        } 
     
    208208    // If there are already some items being displayed, it does not erase them 
    209209    function displayItems() { 
    210         $j.each(items, function(i, item) { 
     210        $.each(items, function(i, item) { 
    211211            var newDiv = createDiv(); 
    212212            newDiv.css({ 
     
    223223 
    224224    function changeTemplateSize() { 
    225         var tpl = $j('#templateDiv'); 
    226         tpl.width($j('#badge_width').val() * pixelsPerCm); 
    227         tpl.height($j('#badge_height').val() * pixelsPerCm); 
     225        var tpl = $('#templateDiv'); 
     226        tpl.width($('#badge_width').val() * pixelsPerCm); 
     227        tpl.height($('#badge_height').val() * pixelsPerCm); 
    228228        previousTemplateDimensions.width = templateDimensions.width; 
    229229        previousTemplateDimensions.height = templateDimensions.height; 
    230         templateDimensions = new Dimensions($j('#badge_width').val() * pixelsPerCm, $j('#badge_height').val() * pixelsPerCm); 
     230        templateDimensions = new Dimensions($('#badge_width').val() * pixelsPerCm, $('#badge_height').val() * pixelsPerCm); 
    231231        updateRulers(); 
    232232        if (backgroundId != -1) { 
    233             var url = $j('#background').attr('src'); 
    234             $j('#background').remove(); 
     233            var url = $('#background').attr('src'); 
     234            $('#background').remove(); 
    235235            displayBackground(url); 
    236236        } 
     
    276276            if (lastSelectedDiv) { 
    277277                var item = items[lastSelectedDiv.attr('id')]; 
    278                 item.fontFamily = $j('#font_selector').val(); 
    279                 item.fontFamilyIndex = $j('#font_selector').prop('selectedIndex'); 
     278                item.fontFamily = $('#font_selector').val(); 
     279                item.fontFamilyIndex = $('#font_selector').prop('selectedIndex'); 
    280280                lastSelectedDiv.html(item.toHTML()); 
    281281            } 
     
    284284            if (lastSelectedDiv) { 
    285285                var item = items[lastSelectedDiv.attr('id')]; 
    286                 item.color = $j('#color_selector').val(); 
    287                 item.colorIndex = $j('#color_selector').prop('selectedIndex'); 
     286                item.color = $('#color_selector').val(); 
     287                item.colorIndex = $('#color_selector').prop('selectedIndex'); 
    288288                lastSelectedDiv.html(item.toHTML()); 
    289289            } 
     
    292292            if (lastSelectedDiv) { 
    293293                var item = items[lastSelectedDiv.attr('id')]; 
    294                 item.textAlign = $j('#alignment_selector').val(); 
    295                 item.textAlignIndex = $j('#alignment_selector').prop('selectedIndex'); 
     294                item.textAlign = $('#alignment_selector').val(); 
     295                item.textAlignIndex = $('#alignment_selector').prop('selectedIndex'); 
    296296                lastSelectedDiv.html(item.toHTML()); 
    297297            } 
     
    300300            if (lastSelectedDiv) { 
    301301                var item = items[lastSelectedDiv.attr('id')]; 
    302                 item.fontSize = $j('#size_selector').val(); 
    303                 item.fontSizeIndex = $j('#size_selector').prop('selectedIndex'); 
     302                item.fontSize = $('#size_selector').val(); 
     303                item.fontSizeIndex = $('#size_selector').prop('selectedIndex'); 
    304304                lastSelectedDiv.html(item.toHTML()); 
    305305            } 
     
    308308            if (lastSelectedDiv) { 
    309309                var item = items[lastSelectedDiv.attr('id')]; 
    310                 switch($j('#style_selector').val()) { 
     310                switch($('#style_selector').val()) { 
    311311                    case "normal": 
    312312                        item.bold = false; 
     
    329329                } 
    330330 
    331                 item.styleIndex = $j('#style_selector').prop('selectedIndex'); 
     331                item.styleIndex = $('#style_selector').prop('selectedIndex'); 
    332332                lastSelectedDiv.html(item.toHTML()); 
    333333            } 
     
    336336            if (lastSelectedDiv) { 
    337337                var item = items[lastSelectedDiv.attr('id')]; 
    338                 item.text = unescapeHTML($j('#fixed_text_field').val()); 
    339                 $j('#fixed_text_field').val(item.text); 
     338                item.text = unescapeHTML($('#fixed_text_field').val()); 
     339                $('#fixed_text_field').val(item.text); 
    340340                lastSelectedDiv.html(item.toHTML()); 
    341341            } 
     
    344344            if (lastSelectedDiv) { 
    345345                var item = items[lastSelectedDiv.attr('id')]; 
    346                 item.width = $j('#width_field').val() * pixelsPerCm; 
     346                item.width = $('#width_field').val() * pixelsPerCm; 
    347347                lastSelectedDiv.html(item.toHTML()); 
    348348            } 
     
    352352 
    353353    function save() { 
    354         if ($j('#template_name').val() == '') { 
     354        if ($('#template_name').val() == '') { 
    355355            alert("Please choose a name for the template"); 
    356356            return; 
    357357        } 
    358358        var template = []; 
    359         template.push($j('#template_name').val()); 
     359        template.push($('#template_name').val()); 
    360360        template.push(templateDimensions, pixelsPerCm); 
    361361        template.push(backgroundId); 
    362362 
    363363        template.push(items); 
    364         $j('#templateData').val(Json.write(template)); 
    365         $j('#saveForm').submit(); 
     364        $('#templateData').val(Json.write(template)); 
     365        $('#saveForm').submit(); 
    366366    } 
    367367 
     
    371371        } 
    372372        else { 
    373             var iframeDocument = $j('#uploadTarget')[0].contentDocument || $j('#uploadTarget')[0].contentWindow; 
     373            var iframeDocument = $('#uploadTarget')[0].contentDocument || $('#uploadTarget')[0].contentWindow; 
    374374            if (iframeDocument.document) { 
    375375                iframeDocument = iframeDocument.document; 
     
    378378            try { 
    379379                if (backgroundId != -1) { 
    380                     $j('#background').remove(); 
     380                    $('#background').remove(); 
    381381                } 
    382                 backgroundId = $j('#background_id', iframeDocument).html(); 
    383                 var backgroundURL = $j('#background_url', iframeDocument).html(); 
     382                backgroundId = $('#background_id', iframeDocument).html(); 
     383                var backgroundURL = $('#background_url', iframeDocument).html(); 
    384384                displayBackground(backgroundURL); 
    385385            } 
    386386            catch (err) { 
    387                 $j('#loadingIcon').hide(); 
     387                $('#loadingIcon').hide(); 
    388388            } 
    389389        } 
     
    391391 
    392392    function displayBackground(backgroundURL) { 
    393         $j('<img/>', { 
     393        $('<img/>', { 
    394394            id: 'background', 
    395395            src: backgroundURL 
     
    402402            zIndex: 5 
    403403        }).load(function() { 
    404             $j('#loadingIcon').hide(); 
     404            $('#loadingIcon').hide(); 
    405405        }).appendTo('#templateDiv'); 
    406406    } 
     
    409409        if (backgroundId != -1) { 
    410410            backgroundId = -1; 
    411             $j('#background').remove(); 
     411            $('#background').remove(); 
    412412        } 
    413413    } 
     
    418418    } 
    419419 
    420     $j(document).ready(function() { 
     420    $(document).ready(function() { 
    421421        // select items on mousedown 
    422         $j('#templateDiv > div').live('mousedown', function() { 
    423             markSelected($j(this)); 
     422        $('#templateDiv > div').live('mousedown', function() { 
     423            markSelected($(this)); 
    424424        }); 
    425425 
    426426        // toggle grid/snap mode 
    427         $j('#snap_checkbox').change(function() { 
     427        $('#snap_checkbox').change(function() { 
    428428            snapToGrid = this.checked; 
    429429        }).change(); 
    430430 
    431431        // show a throbber when uploading a background 
    432         $j('#bgForm').submit(function() { 
    433             $j('#loadingIcon').show(); 
    434         }); 
    435  
    436         $j('#removeBackground').click(function(e) { 
     432        $('#bgForm').submit(function() { 
     433            $('#loadingIcon').show(); 
     434        }); 
     435 
     436        $('#removeBackground').click(function(e) { 
    437437            e.preventDefault(); 
    438438            removeBackground(); 
    439439        }); 
    440440 
    441         $j('.moveButton').click(function(e) { 
     441        $('.moveButton').click(function(e) { 
    442442            e.preventDefault(); 
    443             var dir = $j(this).data('direction'); 
     443            var dir = $(this).data('direction'); 
    444444            moveFuncs[dir](); 
    445445        }); 
    446446 
    447         $j('.attrButton').click(function(e) { 
     447        $('.attrButton').click(function(e) { 
    448448            e.preventDefault(); 
    449             var attr = $j(this).data('attr'); 
     449            var attr = $(this).data('attr'); 
    450450            attrFuncs[attr](); 
    451451        }); 
    452452 
    453         $j('.attrSelect').change(function() { 
    454             var attr = $j(this).data('attr'); 
     453        $('.attrSelect').change(function() { 
     454            var attr = $(this).data('attr'); 
    455455            attrFuncs[attr](); 
    456456        }); 
    457457 
    458         $j('#changeTemplateSize').click(function(e) { 
     458        $('#changeTemplateSize').click(function(e) { 
    459459            e.preventDefault(); 
    460460            changeTemplateSize(); 
    461461        }); 
    462462 
    463         $j('#insertButton').click(function(e) { 
     463        $('#insertButton').click(function(e) { 
    464464            e.preventDefault(); 
    465465            insertElement(); 
    466466        }); 
    467467 
    468         $j('#removeButton').click(function(e) { 
     468        $('#removeButton').click(function(e) { 
    469469            e.preventDefault(); 
    470470            removeElement(); 
    471471        }); 
    472472 
    473         $j('#saveButton').click(function(e) { 
     473        $('#saveButton').click(function(e) { 
    474474            e.preventDefault(); 
    475475            save(); 
    476476        }); 
    477477 
    478         $j('#uploadTarget').load(sent); 
     478        $('#uploadTarget').load(sent); 
    479479    }); 
    480480</script> 
     
    793793    if (${ editingTemplate }) { 
    794794        var template = ${ templateData }; 
    795         $j('#template_name').val(template[0]); 
    796         $j('#templateDiv').width(template[1].width).height(template[1].height); 
     795        $('#template_name').val(template[0]); 
     796        $('#templateDiv').width(template[1].width).height(template[1].height); 
    797797        items = template[4]; 
    798798        // We give the toHTML() method to each of the items 
    799         $j.each(items, function(i, item) { 
     799        $.each(items, function(i, item) { 
    800800            item.toHTML = Item.prototype.toHTML; 
    801801        }); 
     
    807807    previousTemplateDimensions = new Dimensions(0,0); 
    808808 
    809     $j('#badge_width').val(templateDimensions.width / pixelsPerCm); 
    810     $j('#badge_height').val(templateDimensions.height / pixelsPerCm); 
     809    $('#badge_width').val(templateDimensions.width / pixelsPerCm); 
     810    $('#badge_height').val(templateDimensions.height / pixelsPerCm); 
    811811 
    812812    updateRulers(); // creates the initial rulers 
  • indico/MaKaC/webinterface/tpls/ConfModifPosterDesign.tpl

    r0ca8eb r80545d  
    8989        itemId++; 
    9090 
    91         var newDiv = $j('<div/>', { 
     91        var newDiv = $('<div/>', { 
    9292            id: itemId 
    9393        }).css({ 
     
    121121        var newDiv = createDiv(); 
    122122        // We set the inner html of the div depending on the type of item inserted 
    123         switch($j('#elementList').val()) { 
     123        switch($('#elementList').val()) { 
    124124            ${ switchCases } 
    125125        } 
     
    136136            items[lastSelectedDiv.attr('id')] = false; 
    137137            lastSelectedDiv.remove(); 
    138             $j('#selection_text').html(''); 
     138            $('#selection_text').html(''); 
    139139            lastSelectedDiv = null; 
    140             $j('#removeButton').prop('disabled', true); 
     140            $('#removeButton').prop('disabled', true); 
    141141        } 
    142142    } 
     
    145145        // Change the text that says which item is selected 
    146146        var id = newSelectedDiv.attr('id'); 
    147         $j('#selection_text').html(translate[items[id].key]); 
     147        $('#selection_text').html(translate[items[id].key]); 
    148148 
    149149        // TODO: add check to see if there's a table inside and not an image 
     
    160160        newSelectedDiv.html(newSelectedItem.toHTML()); 
    161161        lastSelectedDiv = newSelectedDiv; 
    162         $j('#removeButton').prop('disabled', false); 
     162        $('#removeButton').prop('disabled', false); 
    163163 
    164164        // Change the selectors so that they match the properties of the item 
    165         $j('#alignment_selector').prop('selectedIndex', newSelectedItem.textAlignIndex); 
    166         $j('#font_selector').prop('selectedIndex', newSelectedItem.fontFamilyIndex); 
    167         $j('#size_selector').prop('selectedIndex', newSelectedItem.fontSizeIndex); 
    168         $j('#style_selector').prop('selectedIndex', newSelectedItem.styleIndex); 
    169         $j('#color_selector').prop('selectedIndex', newSelectedItem.colorIndex); 
    170         $j('#width_field').val(newSelectedItem.width / pixelsPerCm); 
     165        $('#alignment_selector').prop('selectedIndex', newSelectedItem.textAlignIndex); 
     166        $('#font_selector').prop('selectedIndex', newSelectedItem.fontFamilyIndex); 
     167        $('#size_selector').prop('selectedIndex', newSelectedItem.fontSizeIndex); 
     168        $('#style_selector').prop('selectedIndex', newSelectedItem.styleIndex); 
     169        $('#color_selector').prop('selectedIndex', newSelectedItem.colorIndex); 
     170        $('#width_field').val(newSelectedItem.width / pixelsPerCm); 
    171171        if (newSelectedItem.key == "Fixed Text") { 
    172             $j('#fixed_text_field').val(newSelectedItem.text).prop('disabled', false); 
    173             $j('#changeText').prop('disabled', false); 
     172            $('#fixed_text_field').val(newSelectedItem.text).prop('disabled', false); 
     173            $('#changeText').prop('disabled', false); 
    174174        } else { 
    175             $j('#fixed_text_field').val("").prop('disabled', true); 
    176             $j('#changeText').prop('disabled', true); 
     175            $('#fixed_text_field').val("").prop('disabled', true); 
     176            $('#changeText').prop('disabled', true); 
    177177        } 
    178178    } 
     
    180180    function updateRulers() { 
    181181        if (templateDimensions.width > previousTemplateDimensions.width) { 
    182             var hRuler = $j('#horizontal_ruler'); 
     182            var hRuler = $('#horizontal_ruler'); 
    183183            for (var i = Math.ceil(previousTemplateDimensions.width / pixelsPerCm); i < Math.ceil(templateDimensions.width / pixelsPerCm); i++) { 
    184                 $j('<div/>', { 
     184                $('<div/>', { 
    185185                    id: 'rulerh' + i 
    186186                }).css({ 
     
    200200        else if (templateDimensions.width < previousTemplateDimensions.width) { 
    201201            for (var i = Math.ceil(previousTemplateDimensions.width / pixelsPerCm); i > Math.ceil(templateDimensions.width / pixelsPerCm); i--) { 
    202                 $j('#horizontal_ruler > #rulerh' + (i - 1)).remove(); 
     202                $('#horizontal_ruler > #rulerh' + (i - 1)).remove(); 
    203203            } 
    204204        } 
    205205 
    206206        if (templateDimensions.height > previousTemplateDimensions.height) { 
    207             var vRuler = $j('#vertical_ruler'); 
     207            var vRuler = $('#vertical_ruler'); 
    208208            for (var i = Math.ceil(previousTemplateDimensions.height / pixelsPerCm); i < Math.ceil(templateDimensions.height / pixelsPerCm); i++) { 
    209                 $j('<div/>', { 
     209                $('<div/>', { 
    210210                    id: 'rulerv' + i 
    211211                }).css({ 
     
    225225        else if (templateDimensions.height < previousTemplateDimensions.height) { 
    226226            for (i = Math.ceil(previousTemplateDimensions.height / pixelsPerCm); i > Math.ceil(templateDimensions.height / pixelsPerCm); i--) { 
    227                 $j('#vertical_ruler > #rulerv' + (i - 1)).remove(); 
     227                $('#vertical_ruler > #rulerv' + (i - 1)).remove(); 
    228228            } 
    229229        } 
     
    233233    // If there are already some items being displayed, it does not erase them 
    234234    function displayItems() { 
    235         $j.each(items, function(i, item) { 
     235        $.each(items, function(i, item) { 
    236236            var newDiv = createDiv(); 
    237237            newDiv.css({ 
     
    249249 
    250250    function changeTemplateSize() { 
    251         var tpl = $j('#templateDiv'); 
    252         tpl.width($j('#poster_width').val() * pixelsPerCm); 
    253         tpl.height($j('#poster_height').val() * pixelsPerCm); 
     251        var tpl = $('#templateDiv'); 
     252        tpl.width($('#poster_width').val() * pixelsPerCm); 
     253        tpl.height($('#poster_height').val() * pixelsPerCm); 
    254254        previousTemplateDimensions.width = templateDimensions.width; 
    255255        previousTemplateDimensions.height = templateDimensions.height; 
    256         templateDimensions = new Dimensions($j('#poster_width').val() * pixelsPerCm, $j('#poster_height').val() * pixelsPerCm); 
     256        templateDimensions = new Dimensions($('#poster_width').val() * pixelsPerCm, $('#poster_height').val() * pixelsPerCm); 
    257257        updateRulers(); 
    258258        if (backgroundId != -1) { 
    259             var url = $j('#background').attr('src'); 
    260             $j('#background').remove(); 
     259            var url = $('#background').attr('src'); 
     260            $('#background').remove(); 
    261261            displayBackground(url); 
    262262        } 
     
    302302            if (lastSelectedDiv) { 
    303303                var item = items[lastSelectedDiv.attr('id')]; 
    304                 item.fontFamily = $j('#font_selector').val(); 
    305                 item.fontFamilyIndex = $j('#font_selector').prop('selectedIndex'); 
     304                item.fontFamily = $('#font_selector').val(); 
     305                item.fontFamilyIndex = $('#font_selector').prop('selectedIndex'); 
    306306                lastSelectedDiv.html(item.toHTML()); 
    307307            } 
     
    310310            if (lastSelectedDiv) { 
    311311                var item = items[lastSelectedDiv.attr('id')]; 
    312                 item.color = $j('#color_selector').val(); 
    313                 item.colorIndex = $j('#color_selector').prop('selectedIndex'); 
     312                item.color = $('#color_selector').val(); 
     313                item.colorIndex = $('#color_selector').prop('selectedIndex'); 
    314314                lastSelectedDiv.html(item.toHTML()); 
    315315            } 
     
    318318            if (lastSelectedDiv) { 
    319319                var item = items[lastSelectedDiv.attr('id')]; 
    320                 item.textAlign = $j('#alignment_selector').val(); 
    321                 item.textAlignIndex = $j('#alignment_selector').prop('selectedIndex'); 
     320                item.textAlign = $('#alignment_selector').val(); 
     321                item.textAlignIndex = $('#alignment_selector').prop('selectedIndex'); 
    322322                lastSelectedDiv.html(item.toHTML()); 
    323323            } 
     
    326326            if (lastSelectedDiv) { 
    327327                var item = items[lastSelectedDiv.attr('id')]; 
    328                 item.fontSize = zoom_font(zoom_factor, $j('#size_selector').val()); 
    329                 item.fontSizeIndex = $j('#size_selector').prop('selectedIndex'); 
     328                item.fontSize = zoom_font(zoom_factor, $('#size_selector').val()); 
     329                item.fontSizeIndex = $('#size_selector').prop('selectedIndex'); 
    330330                lastSelectedDiv.html(item.toHTML()); 
    331331            } 
     
    334334            if (lastSelectedDiv) { 
    335335                var item = items[lastSelectedDiv.attr('id')]; 
    336                 switch($j('#style_selector').val()) { 
     336                switch($('#style_selector').val()) { 
    337337                    case "normal": 
    338338                        item.bold = false; 
     
    355355                } 
    356356 
    357                 item.styleIndex = $j('#style_selector').prop('selectedIndex'); 
     357                item.styleIndex = $('#style_selector').prop('selectedIndex'); 
    358358                lastSelectedDiv.html(item.toHTML()); 
    359359            } 
     
    362362            if (lastSelectedDiv) { 
    363363                var item = items[lastSelectedDiv.attr('id')]; 
    364                 item.text = unescapeHTML($j('#fixed_text_field').val()); 
    365                 $j('#fixed_text_field').val(item.text); 
     364                item.text = unescapeHTML($('#fixed_text_field').val()); 
     365                $('#fixed_text_field').val(item.text); 
    366366                lastSelectedDiv.html(item.toHTML()); 
    367367            } 
     
    370370            if (lastSelectedDiv) { 
    371371                var item = items[lastSelectedDiv.attr('id')]; 
    372                 item.width = $j('#width_field').val() * pixelsPerCm; 
     372                item.width = $('#width_field').val() * pixelsPerCm; 
    373373                lastSelectedDiv.html(item.toHTML()); 
    374374            } 
     
    383383 
    384384    function save() { 
    385         if ($j('#template_name').val() == '') { 
     385        if ($('#template_name').val() == '') { 
    386386            alert("Please choose a name for the template"); 
    387387            return; 
    388388        } 
    389389        var template = []; 
    390         template.push($j('#template_name').val()); 
     390        template.push($('#template_name').val()); 
    391391        template.push(templateDimensions, pixelsPerCm); 
    392392        template.push(backgroundId); 
    393393 
    394         $j.each(items, function(i, item) { 
     394        $.each(items, function(i, item) { 
    395395            if (item != false) { 
    396396                item.fontSize = zoom_font(1/zoom_factor, item.fontSize); 
     
    399399 
    400400        template.push(items); 
    401         $j('#templateData').val(Json.write(template)); 
    402         $j('#saveForm').submit(); 
     401        $('#templateData').val(Json.write(template)); 
     402        $('#saveForm').submit(); 
    403403    } 
    404404 
     
    408408        } 
    409409        else { 
    410             var iframeDocument = $j('#uploadTarget')[0].contentDocument || $j('#uploadTarget')[0].contentWindow; 
     410            var iframeDocument = $('#uploadTarget')[0].contentDocument || $('#uploadTarget')[0].contentWindow; 
    411411            if (iframeDocument.document) { 
    412412                iframeDocument = iframeDocument.document; 
     
    415415            try { 
    416416                if (backgroundId != -1) { 
    417                     $j('#background').remove(); 
     417                    $('#background').remove(); 
    418418                } 
    419                 backgroundId = $j('#background_id', iframeDocument).html(); 
    420                 var backgroundURL = $j('#background_url', iframeDocument).html(); 
    421                 backgroundPos = $j('#background_pos', iframeDocument).html(); 
     419                backgroundId = $('#background_id', iframeDocument).html(); 
     420                var backgroundURL = $('#background_url', iframeDocument).html(); 
     421                backgroundPos = $('#background_pos', iframeDocument).html(); 
    422422                displayBackground(backgroundURL); 
    423423            } 
    424424            catch (err) { 
    425                 $j('#loadingIcon').hide(); 
     425                $('#loadingIcon').hide(); 
    426426            } 
    427427        } 
     
    429429 
    430430    function setBackgroundPos(mode) { 
    431         var background = $j('#background'); 
    432         var hiddenField = $j('#bgPosition'); 
    433         var bgPosStretch = $j('#bgPosStretch'); 
    434         var bgPosCenter = $j('#bgPosCenter'); 
     431        var background = $('#background'); 
     432        var hiddenField = $('#bgPosition'); 
     433        var bgPosStretch = $('#bgPosStretch'); 
     434        var bgPosCenter = $('#bgPosCenter'); 
    435435 
    436436        if (mode == 'Stretch') { 
     
    485485 
    486486    function displayBackground(backgroundURL) { 
    487         $j('<img/>', { 
     487        $('<img/>', { 
    488488            id: 'background', 
    489489            src: backgroundURL 
     
    496496            zIndex: 5 
    497497        }).load(function() { 
    498             $j('#loadingIcon').hide(); 
     498            $('#loadingIcon').hide(); 
    499499            setBackgroundPos(backgroundPos); 
    500500        }).appendTo('#templateDiv'); 
     
    504504        if (backgroundId != -1) { 
    505505            backgroundId = -1; 
    506             $j('#background').remove(); 
     506            $('#background').remove(); 
    507507        } 
    508508    } 
     
    513513    } 
    514514 
    515     $j(document).ready(function() { 
     515    $(document).ready(function() { 
    516516        // select items on mousedown 
    517         $j('#templateDiv > div').live('mousedown', function() { 
    518             markSelected($j(this)); 
     517        $('#templateDiv > div').live('mousedown', function() { 
     518            markSelected($(this)); 
    519519        }); 
    520520 
    521521        // toggle grid/snap mode 
    522         $j('#snap_checkbox').change(function() { 
     522        $('#snap_checkbox').change(function() { 
    523523            snapToGrid = this.checked; 
    524524        }).change(); 
    525525 
    526526        // show a throbber when uploading a background 
    527         $j('#bgForm').submit(function() { 
    528             $j('#loadingIcon').show(); 
    529         }); 
    530  
    531         $j('#removeBackground').click(function(e) { 
     527        $('#bgForm').submit(function() { 
     528            $('#loadingIcon').show(); 
     529        }); 
     530 
     531        $('#removeBackground').click(function(e) { 
    532532            e.preventDefault(); 
    533533            removeBackground(); 
    534534        }); 
    535535 
    536         $j('.moveButton').click(function(e) { 
     536        $('.moveButton').click(function(e) { 
    537537            e.preventDefault(); 
    538             var dir = $j(this).data('direction'); 
     538            var dir = $(this).data('direction'); 
    539539            moveFuncs[dir](); 
    540540        }); 
    541541 
    542         $j('.attrButton').click(function(e) { 
     542        $('.attrButton').click(function(e) { 
    543543            e.preventDefault(); 
    544             var attr = $j(this).data('attr'); 
     544            var attr = $(this).data('attr'); 
    545545            attrFuncs[attr](); 
    546546        }); 
    547547 
    548         $j('.attrSelect').change(function() { 
    549             var attr = $j(this).data('attr'); 
     548        $('.attrSelect').change(function() { 
     549            var attr = $(this).data('attr'); 
    550550            attrFuncs[attr](); 
    551551        }); 
    552552 
    553         $j('#changeTemplateSize').click(function(e) { 
     553        $('#changeTemplateSize').click(function(e) { 
    554554            e.preventDefault(); 
    555555            changeTemplateSize(); 
    556556        }); 
    557557 
    558         $j('#insertButton').click(function(e) { 
     558        $('#insertButton').click(function(e) { 
    559559            e.preventDefault(); 
    560560            insertElement(); 
    561561        }); 
    562562 
    563         $j('#removeButton').click(function(e) { 
     563        $('#removeButton').click(function(e) { 
    564564            e.preventDefault(); 
    565565            removeElement(); 
    566566        }); 
    567567 
    568         $j('#saveButton').click(function(e) { 
     568        $('#saveButton').click(function(e) { 
    569569            e.preventDefault(); 
    570570            save(); 
    571571        }); 
    572572 
    573         $j('#uploadTarget').load(sent); 
     573        $('#uploadTarget').load(sent); 
    574574    }); 
    575575</script> 
     
    896896    if (${ editingTemplate }) { 
    897897        var template = ${ templateData }; 
    898         $j('#template_name').val(template[0]); 
    899         $j('#templateDiv').width(template[1].width).height(template[1].height); 
     898        $('#template_name').val(template[0]); 
     899        $('#templateDiv').width(template[1].width).height(template[1].height); 
    900900        items = template[4]; 
    901901        // We give the toHTML() method to each of the items 
    902         $j.each(items, function(i, item) { 
     902        $.each(items, function(i, item) { 
    903903            item.toHTML = Item.prototype.toHTML; 
    904904        }); 
     
    910910    previousTemplateDimensions = new Dimensions(0,0); 
    911911 
    912     $j('#poster_width').val(templateDimensions.width / pixelsPerCm); 
    913     $j('#poster_height').val(templateDimensions.height / pixelsPerCm); 
     912    $('#poster_width').val(templateDimensions.width / pixelsPerCm); 
     913    $('#poster_height').val(templateDimensions.height / pixelsPerCm); 
    914914 
    915915    updateRulers(); // creates the initial rulers 
  • indico/MaKaC/webinterface/tpls/RoomBookingBlockingForm.tpl

    rc180c2 r80545d  
    9090 
    9191    <script type="text/javascript"> 
    92         jQuery(document).ready(function($) { 
     92        $(document).ready(function() { 
    9393            $('#dateRange').daterange({ 
    9494                % if not rh._createNew: 
     
    123123 
    124124            var serializeACL = function() { 
    125                 $j('#allowedUsers').val(Json.write(principalField.getUsers())); 
     125                $('#allowedUsers').val(Json.write(principalField.getUsers())); 
    126126            } 
    127127 
     
    132132                }); 
    133133                hasRooms = (roomGuids.length > 0); 
    134                 $j('#blockedRooms').val(Json.write(roomGuids)); 
     134                $('#blockedRooms').val(Json.write(roomGuids)); 
    135135            } 
    136136 
     
    168168                $E('roomChooser').set(roomChooser.draw(), addRoomButton); 
    169169                // sort by room name. we cannot do it serverside since objects are not ordered 
    170                 $j('#roomChooser select > option').detach().sort(function(a, b) { 
    171                     return strnatcmp($j(a).text().toLowerCase(), $j(b).text().toLowerCase()); 
    172                 }).appendTo($j('#roomChooser select')); 
     170                $('#roomChooser select > option').detach().sort(function(a, b) { 
     171                    return strnatcmp($(a).text().toLowerCase(), $(b).text().toLowerCase()); 
     172                }).appendTo($('#roomChooser select')); 
    173173            }) 
    174174            var addRoomButton = Html.input("button", {style:{marginRight: pixels(5)}}, $T('Add Room') ); 
  • indico/MaKaC/webinterface/tpls/RoomBookingBlockingList.tpl

    rfb6f28 r80545d  
    4141 
    4242    <script type="text/javascript"> 
    43     (function($) { 
    4443        $('.blockingShowRooms').toggle(function(e) { 
    4544            e.preventDefault(); 
     
    5352            $this.closest('tbody').removeClass('hasRoomList'); 
    5453        }); 
    55     })(jQuery); 
    5654    </script> 
    5755% else: 
  • indico/MaKaC/webinterface/tpls/RoomBookingBlockingsForMyRooms.tpl

    rfb6f28 r80545d  
    6161 
    6262    <script type="text/javascript"> 
    63     (function($) { 
    6463        $('.processRoomBlocking').click(function(e) { 
    6564            e.preventDefault(); 
     
    8887            }); 
    8988        }); 
    90     })(jQuery); 
    9189    </script> 
    9290% else: 
  • indico/MaKaC/webinterface/tpls/RoomBookingBookingForm.tpl

    r870828 r80545d  
    88 
    99        // Init, clean up (make all textboxes white again) 
    10         var bookingForm = $j('#bookingForm'); 
    11         $j(':input', bookingForm).removeClass('invalid'); 
     10        var bookingForm = $('#bookingForm'); 
     11        $(':input', bookingForm).removeClass('invalid'); 
    1212 
    1313        var isValid = true; 
     
    1515        isValid = required_fields(['bookedForName', 'contactEmail', 'reason']) && isValid; 
    1616 
    17         if (!Util.Validation.isEmailList($j('#contactEmail').val())) { 
     17        if (!Util.Validation.isEmailList($('#contactEmail').val())) { 
    1818            isValid = false; 
    19             $j('#contactEmail').addClass('invalid'); 
     19            $('#contactEmail').addClass('invalid'); 
    2020        } 
    2121 
     
    2323        if (isValid && !onSubmit) { 
    2424            var lastDateInfo = bookingForm.data('lastDateInfo'); 
    25             var dateInfo = $j('#sDay, #sMonth, #sYear, #eDay, #eMonth, #eYear').serialize(); 
     25            var dateInfo = $('#sDay, #sMonth, #sYear, #eDay, #eMonth, #eYear').serialize(); 
    2626            if (dateInfo != lastDateInfo) { 
    2727                bookingForm.data('lastDateInfo', dateInfo); 
     
    3838        % if candResv.room.needsAVCSetup: 
    3939            var vcIsValid = true; 
    40             if ($j('#usesAVC').is(':checked')) { 
    41                 vcIsValid = $j('input.videoConferenceOption').is(':checked'); 
    42             } 
    43             $j('#vcSystemList').toggleClass('invalid', !vcIsValid); 
     40            if ($('#usesAVC').is(':checked')) { 
     41                vcIsValid = $('input.videoConferenceOption').is(':checked'); 
     42            } 
     43            $('#vcSystemList').toggleClass('invalid', !vcIsValid); 
    4444            isValid = isValid && vcIsValid; 
    4545        % endif 
     
    4949 
    5050 
    51     $j(window).load(function() { 
     51    $(window).load(function() { 
    5252        % if candResv.room.needsAVCSetup: 
    53             $j('.videoConferenceOption, #needsAVCSupport').change(function() { 
     53            $('.videoConferenceOption, #needsAVCSupport').change(function() { 
    5454                if(this.checked) { 
    55                     $j('#usesAVC').prop('checked', true); 
     55                    $('#usesAVC').prop('checked', true); 
    5656                } 
    5757            }); 
    58             $j('#usesAVC').change(function() { 
     58            $('#usesAVC').change(function() { 
    5959                if(!this.checked) { 
    60                     $j('.videoConferenceOption, #needsAVCSupport').prop('checked', false); 
     60                    $('.videoConferenceOption, #needsAVCSupport').prop('checked', false); 
    6161                } 
    6262            }); 
     
    6767        } 
    6868 
    69         $j('#bookingForm').delegate(':input', 'keyup change', function() { 
     69        $('#bookingForm').delegate(':input', 'keyup change', function() { 
    7070            forms_are_valid(); 
    7171        }).submit(function(e) { 
     
    7575            }; 
    7676        }).keydown(function(e) { 
    77             if(e.which == 13 && !$j(e.target).is('textarea, :submit')) { 
     77            if(e.which == 13 && !$(e.target).is('textarea, :submit')) { 
    7878                e.preventDefault(); 
    79                 $j('#saveBooking').click(); 
     79                $('#saveBooking').click(); 
    8080            } 
    8181        }); 
    8282 
    83         $j('#saveBooking').click(function(e) { 
    84             $j('#bookingForm').attr('action', '${saveBookingUH.getURL(conf)}'); 
     83        $('#saveBooking').click(function(e) { 
     84            $('#bookingForm').attr('action', '${saveBookingUH.getURL(conf)}'); 
    8585        }); 
    86         $j('#checkBooking').click(function(e) { 
    87             $j('#bookingForm').attr('action', '${bookingFormURL}#conflicts'); 
    88             if (!validate_period($j('#bookingForm')[0], true, ${ allowPast })) { 
     86        $('#checkBooking').click(function(e) { 
     87            $('#bookingForm').attr('action', '${bookingFormURL}#conflicts'); 
     88            if (!validate_period($('#bookingForm')[0], true, ${ allowPast })) { 
    8989                alert(${_("'There are errors in the form. Please correct fields with red background.'")}); 
    9090                e.preventDefault(); 
  • indico/MaKaC/webinterface/tpls/RoomBookingPeriodForm.tpl

    r870828 r80545d  
    55    function set_repeatition_comment() { 
    66        var s = ''; 
    7         var repType = parseInt($j('#repeatability').val(), 10); 
     7        var repType = parseInt($('#repeatability').val(), 10); 
    88        if(repType > 0) { 
    9             var date = new Date(parseInt($j('#sYear').val(), 10), parseInt($j('#sMonth').val()-1, 10), parseInt($j('#sDay').val(), 10)); 
     9            var date = new Date(parseInt($('#sYear').val(), 10), parseInt($('#sMonth').val()-1, 10), parseInt($('#sDay').val(), 10)); 
    1010            var weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; 
    1111            s = 'on ' + weekDays[date.getDay()]; 
     
    1717            } 
    1818        } 
    19         $j('#repComment').html(s); 
     19        $('#repComment').html(s); 
    2020    } 
    2121 
  • indico/MaKaC/webinterface/tpls/RoomBookingSearch4Bookings.tpl

    r870828 r80545d  
    55    // Displays div with dates and hours 
    66    function all_date_fields_are_blank() { 
    7         return ($j('#sDay').val()=='' && $j('#sMonth').val()=='' && $j('#sYear').val()=='' && $j('#sdate').val()=='' && 
    8                  $j('#eDay').val()=='' && $j('#eMonth').val()=='' && $j('#eYear').val()=='' && $j('#edate').val()==''); 
     7        return ($('#sDay').val()=='' && $('#sMonth').val()=='' && $('#sYear').val()=='' && $('#sdate').val()=='' && 
     8                 $('#eDay').val()=='' && $('#eMonth').val()=='' && $('#eYear').val()=='' && $('#edate').val()==''); 
    99    } 
    1010    function all_time_fields_are_blank() { 
    11         return $j('#sTime').val() == '' && $j('#eTime').val() == ''; 
     11        return $('#sTime').val() == '' && $('#eTime').val() == ''; 
    1212    } 
    1313 
     
    2020 
    2121        // Clean up - make all textboxes white again 
    22         var searchForm = $j('#searchForm'); 
    23         $j(':input', searchForm).removeClass('invalid'); 
     22        var searchForm = $('#searchForm'); 
     23        $(':input', searchForm).removeClass('invalid'); 
    2424 
    2525        // Init 
     
    3737        if (isValid && !onSubmit) { 
    3838            var lastDateInfo = searchForm.data('lastDateInfo'); 
    39             var dateInfo = $j('#sDay, #sMonth, #sYear, #eDay, #eMonth, #eYear').serialize(); 
     39            var dateInfo = $('#sDay, #sMonth, #sYear, #eDay, #eMonth, #eYear').serialize(); 
    4040            if (dateInfo != lastDateInfo) { 
    4141                searchForm.data('lastDateInfo', dateInfo); 
     
    5454 
    5555    function confirm_search() { 
    56         if ($j('#onlyMy').is(':checked')) { 
     56        if ($('#onlyMy').is(':checked')) { 
    5757            return true; 
    5858        } 
    59         if ($j('#roomGUID').val() !== null) { 
     59        if ($('#roomGUID').val() !== null) { 
    6060            return true; 
    6161        } 
    62         try { if ($j('#ofMyRooms').is(':checked')) { return true; } } catch (err) {} 
     62        try { if ($('#ofMyRooms').is(':checked')) { return true; } } catch (err) {} 
    6363        alert('Please select a room (or several rooms).'); 
    6464        return false; 
    6565    } 
    6666 
    67     $j(window).load(function() { 
     67    $(window).load(function() { 
    6868        var startDate = IndicoUI.Widgets.Generic.dateField_sdate(false, null, ['sDay', 'sMonth', 'sYear']); 
    6969        $E('sDatePlace').set(startDate); 
     
    9797        % endif 
    9898 
    99         $j('#onlyBookings').change(function() { 
     99        $('#onlyBookings').change(function() { 
    100100            if(this.checked) { 
    101                 $j('#onlyPrebookings').prop('checked', false); 
    102             } 
    103         }); 
    104  
    105         $j('#onlyPrebookings').change(function() { 
     101                $('#onlyPrebookings').prop('checked', false); 
     102            } 
     103        }); 
     104 
     105        $('#onlyPrebookings').change(function() { 
    106106            if(this.checked) { 
    107                 $j('#onlyBookings').prop('checked', false); 
    108             } 
    109         }); 
    110  
    111         $j('#searchForm').delegate(':input', 'keyup change', function() { 
     107                $('#onlyBookings').prop('checked', false); 
     108            } 
     109        }); 
     110 
     111        $('#searchForm').delegate(':input', 'keyup change', function() { 
    112112            forms_are_valid(); 
    113113        }).submit(function(e) { 
  • indico/MaKaC/webinterface/tpls/RoomBookingSearch4Rooms.tpl

    r870828 r80545d  
    44    // Displays div with dates and hours 
    55    function display_availability(bool) { 
    6         $j('#sdatesTR, #edatesTR, #hoursTR, #repTypeTR, #includePrebookingsTR, #includePendingBlockingsTR').toggle(bool); 
     6        $('#sdatesTR, #edatesTR, #hoursTR, #repTypeTR, #includePrebookingsTR, #includePendingBlockingsTR').toggle(bool); 
    77    } 
    88    // Reds out the invalid textboxes and returns false if something is invalid. 
     
    1414 
    1515        // Clean up - make all textboxes white again 
    16         var searchForm = $j('#searchForm'); 
    17         $j(':input', searchForm).removeClass('invalid'); 
     16        var searchForm = $('#searchForm'); 
     17        $(':input', searchForm).removeClass('invalid'); 
    1818        // Init 
    1919        var isValid = true; 
     
    2121        // Simple search ------------------------------------- 
    2222        // Availability 
    23         if (!$j('input[name="availability"]', searchForm).is(':checked')) { // only if NOT "Don't care" 
     23        if (!$('input[name="availability"]', searchForm).is(':checked')) { // only if NOT "Don't care" 
    2424            isValid = validate_period(searchForm[0]); 
    2525        } 
    2626        // capacity 
    27         if ($j('#capacity').val().length > 0 && parseInt($j('#capacity').val(), 10).toString() == 'NaN') { 
    28             $j('#capacity').addClass('invalid'); 
     27        if ($('#capacity').val().length > 0 && parseInt($('#capacity').val(), 10).toString() == 'NaN') { 
     28            $('#capacity').addClass('invalid'); 
    2929            isValid = false; 
    3030        } 
     
    3333        if (isValid && !onSubmit) { 
    3434            var lastDateInfo = searchForm.data('lastDateInfo'); 
    35             var dateInfo = $j('#sDay, #sMonth, #sYear, #eDay, #eMonth, #eYear').serialize(); 
     35            var dateInfo = $('#sDay, #sMonth, #sYear, #eDay, #eMonth, #eYear').serialize(); 
    3636            if (dateInfo != lastDateInfo) { 
    3737                searchForm.data('lastDateInfo', dateInfo); 
     
    4646        } 
    4747 
    48         if (!$j('#sdate').val()) { 
    49             $j('#sdate').addClass('invalid'); 
     48        if (!$('#sdate').val()) { 
     49            $('#sdate').addClass('invalid'); 
    5050            isValid = false; 
    5151        } 
    5252 
    53         if (!$j('#edate').val()) { 
    54             $j('#edate').addClass('invalid'); 
     53        if (!$('#edate').val()) { 
     54            $('#edate').addClass('invalid'); 
    5555            isValid = false; 
    5656        } 
     
    6262    function isBookable() { 
    6363        // Get the selected option in the SELECT 
    64         var selectedURL = $j('#roomName').val(); 
     64        var selectedURL = $('#roomName').val(); 
    6565        var roomLocationPattern = /roomLocation=([a-zA-Z0-9\-]*)(?:&|$)/; 
    6666        var roomIDPattern = /roomID=([a-zA-Z0-9\-]*)(?:&|$)/; 
     
    9696    } 
    9797 
    98     $j(window).load(function() { 
    99         $j('#searchForm').delegate(':input', 'keyup change', function() { 
     98    $(window).load(function() { 
     99        $('#searchForm').delegate(':input', 'keyup change', function() { 
    100100            forms_are_valid(); 
    101101        }).submit(function(e) { 
     
    109109            set_repeatition_comment(); 
    110110        } 
    111         if ($j('#searchForm input[name="availability"]').is(':checked')) { // if "Don't care" about availability 
     111        if ($('#searchForm input[name="availability"]').is(':checked')) { // if "Don't care" about availability 
    112112            display_availability(false); 
    113113        } 
    114         $j('#searchForm input[name="availability"]').change(function() { 
    115             display_availability($j(this).data('showAvailability')); 
     114        $('#searchForm input[name="availability"]').change(function() { 
     115            display_availability($(this).data('showAvailability')); 
    116116        }); 
    117         $j('#freeSearch').focus(); 
     117        $('#freeSearch').focus(); 
    118118    }); 
    119119 
     
    228228                                                % endif 
    229229                                                % if not forNewBooking: 
    230                                                     <input class="btn" type="button" value="${ _("Room details")}" onclick="document.location = $j('#roomName').val(); return false;" /> 
     230                                                    <input class="btn" type="button" value="${ _("Room details")}" onclick="document.location = $('#roomName').val(); return false;" /> 
    231231                                                % endif 
    232232 
  • indico/htdocs/js/indico/Legacy/Widgets.js

    r6282c5 r80545d  
    931931                if (update && p.inputField) { 
    932932                    p.inputField.value = cal.date.print(p.ifFormat); 
    933                     $j(p.inputField).trigger('change'); 
     933                    $(p.inputField).trigger('change'); 
    934934                } 
    935935                if (update && p.displayArea) 
  • indico/htdocs/js/indico/Legacy/validation.js

    r870828 r80545d  
    8282    for (var i = 0; i < fieldNames.length; ++i) { 
    8383        fieldName = fieldNames[i]; 
    84         if (trim($j('#' + fieldName).val()).length == 0) { 
    85             $j('#' + fieldName).addClass('invalid'); 
     84        if (trim($('#' + fieldName).val()).length == 0) { 
     85            $('#' + fieldName).addClass('invalid'); 
    8686            isValid = false; 
    8787        } 
     
    151151    { 
    152152        // sDate 
    153         if ( !is_valid_date( $j('#sDay').val(), $j('#sMonth').val(), $j('#sYear').val() ) ) 
     153        if ( !is_valid_date( $('#sDay').val(), $('#sMonth').val(), $('#sYear').val() ) ) 
    154154        { 
    155155            f1.sDay.className = f1.sMonth.className = f1.sYear.className = f1.sdate.className = 'invalid'; 
     
    157157        } 
    158158        // eDate 
    159         if ( !is_valid_date( $j('#eDay').val(), $j('#eMonth').val(), $j('#eYear').val() ) ) 
     159        if ( !is_valid_date( $('#eDay').val(), $('#eMonth').val(), $('#eYear').val() ) ) 
    160160        { 
    161161            f1.eDay.className = f1.eMonth.className = f1.eYear.className = f1.edate.className = 'invalid'; 
     
    164164 
    165165        // sDate < eDate 
    166         var sDate = new Date( parseInt( $j('#sYear').val(), 10 ), parseInt( $j('#sMonth').val(), 10 ) - 1, parseInt( $j('#sDay').val(), 10 ) ); 
    167         var eDate = new Date( parseInt( $j('#eYear').val(), 10 ), parseInt( $j('#eMonth').val(), 10 ) - 1, parseInt( $j('#eDay').val(), 10 ) ); 
     166        var sDate = new Date( parseInt( $('#sYear').val(), 10 ), parseInt( $('#sMonth').val(), 10 ) - 1, parseInt( $('#sDay').val(), 10 ) ); 
     167        var eDate = new Date( parseInt( $('#eYear').val(), 10 ), parseInt( $('#eMonth').val(), 10 ) - 1, parseInt( $('#eDay').val(), 10 ) ); 
    168168        if ( isValid ) 
    169169        { 
     
    181181    { 
    182182        // sTime 
    183         if ( !is_valid_time( $j('#sTime').val() ) ) 
     183        if ( !is_valid_time( $('#sTime').val() ) ) 
    184184        { 
    185185            f1.sTime.className = 'invalid'; 
     
    187187        } 
    188188        // eTime 
    189         if ( !is_valid_time( $j('#eTime').val() ) ) 
     189        if ( !is_valid_time( $('#eTime').val() ) ) 
    190190        { 
    191191            f1.eTime.className = 'invalid';  isValid = false; 
    192192        } 
    193193        // sTime < eTime 
    194         if ( !isBefore( $j('#sTime').val(), $j('#eTime').val() ) ) 
     194        if ( !isBefore( $('#sTime').val(), $('#eTime').val() ) ) 
    195195        { 
    196196            f1.sTime.className = f1.eTime.className = 'invalid';  isValid = false; 
     
    203203        var isRepeatabilityValid = true; 
    204204 
    205         switch($j('#repeatability').val()) { 
     205        switch($('#repeatability').val()) { 
    206206        // Single Day 
    207207        case "None": 
Note: See TracChangeset for help on using the changeset viewer.