אונטערשייד צווישן ווערסיעס פון "מעדיעוויקי:Gadget-TemplateParamWizard.js"

/תיעוד, /קוד, /doc
אין תקציר עריכה
(/תיעוד, /קוד, /doc)
 
(11 צווישנדיגע ווערסיעס פונעם זעלבן באַניצער נישט געוויזן)
שורה 452: שורה 452:
             }
             }
             $('#asList').attr('disabled', $('#asRef').prop('checked'));//disable list if ref
             $('#asList').attr('disabled', $('#asRef').prop('checked'));//disable list if ref
$('#asRef').attr('disabled', $('#asList').prop('checked'));//disable ref if list
            $('#asRef').attr('disabled', $('#asList').prop('checked'));//disable ref if list
             $(".ui-dialog-buttonpane button:contains('" + i18n('ok') + "')").button(canOK);
             $(".ui-dialog-buttonpane button:contains('" + i18n('ok') + "')").button(canOK);
             $('#tpw_preview').text(createWikiCode());
             $('#tpw_preview').text(createWikiCode());
שורה 675: שורה 675:
                     )
                     )
                 )
                 )
                .append($('<label>').text(' רעפערענץ '))
                .append($('<input>', { type: 'checkbox', id: 'asRef' }).change(updateRawPreview))
                .append($('<label>').css({ width: '12em' }).text(' אייטעם אין א ליסטע '))
                .append($('<input>', { type: 'checkbox', id: 'asList' }).change(updateRawPreview))
                 .append($('<pre>', { id: 'tpw_preview' }).addClass('tpw-wikicode-preview'));
                 .append($('<pre>', { id: 'tpw_preview' }).addClass('tpw-wikicode-preview'));


             while (paramsOrder.length)
             while (paramsOrder.length)
                 addRow(paramsOrder.shift(), table);
                 addRow(paramsOrder.shift(), table);
            dialog.append($('<label>').text(' רעפערענץ '))
            .append($('<input>', {type: 'checkbox', id: 'asRef'}).change(updateRawPreview))
            .append($('<label>').css({width: '12em'}).text( ' אייטעם אין א ליסטע '))
            .append($('<input>', {type: 'checkbox', id: 'asList'}).change(updateRawPreview));


             var buttons = {}; // we need to do it this way, because with literal object, the keys must be literal.
             var buttons = {}; // we need to do it this way, because with literal object, the keys must be literal.
שורה 697: שורה 696:
             updateRawPreview();
             updateRawPreview();
             $('.tipsy').hover(enterTipsy, leaveTipsy);
             $('.tipsy').hover(enterTipsy, leaveTipsy);
            var clicked = false;
             $(document).delegate('.ui-dialog', 'keyup', function (e) {
             $(document).delegate('.ui-dialog', 'keyup', function (e) {
                if (clicked) return;
                //console.log("keyup");
                 var target = e.target;
                 var target = e.target;
                console.log("target:", target);
                 var tagName = target.tagName.toLowerCase();
                 var tagName = target.tagName.toLowerCase();


שורה 708: שורה 711:
                     tagName !== 'select' &&
                     tagName !== 'select' &&
                     tagName !== 'button';
                     tagName !== 'button';
                //console.log("tagName:", tagName);
                //console.log("isClickableTag:", isClickableTag);


                 if (e.which === $.ui.keyCode.ENTER && isClickableTag) {
                 if (e.which === $.ui.keyCode.ENTER && isClickableTag) {
                    clicked = true;
                    //console.log("enter");
                     $(this).find('.ui-dialog-buttonset button').eq(0).trigger('click');
                     $(this).find('.ui-dialog-buttonset button').eq(0).trigger('click');
                    //console.log("Clicked button:" + $(this).find('.ui-dialog-buttonset button').eq(0).text());


                     return false;
                     return false;
שורה 755: שורה 765:
                             { action: 'opensearch', search: request.term, namespace: 10 },
                             { action: 'opensearch', search: request.term, namespace: 10 },
                             function (data) {
                             function (data) {
                                 if (data[1])
                                 if (data[1]) {
                                     response($(data[1]).map(function (index, item) { return item.replace(/.*:/, ''); }));
                                     var filteredArray = Array.from(data[1]).filter(function (str) { return !str.includes("/דאק") && !str.includes("/תיעוד") && !str.includes("/קוד") && !str.toLowerCase().includes("/doc")});
                                    response($(filteredArray).map(function (index, item) { return item.replace(/.*:/, ''); }));
                                }
                             }
                             }
                         );
                         );