מדיה ויקי:Gadget-Cat-a-lot.js: הבדלים בין גרסאות בדף

←using [[mw:CodeEditor|CodeEditor]]: white-space damage, nitpicking.
שורה 14: שורה 14:
//
//
var catALot = {
var catALot = {
    apiUrl: wgScriptPath + "/api.php",
apiUrl: wgScriptPath + "/api.php",
searchmode: false,
searchmode: false,
version: 2.18,
version: 2.18,
שורה 26: שורה 26:


if (!this.searchmode) $('#cat_a_lot_selections').append('<br><a id="cat_a_lot_remove"><b>' + this.i18n.removeFromCat + '</b></a>');
if (!this.searchmode) $('#cat_a_lot_selections').append('<br><a id="cat_a_lot_remove"><b>' + this.i18n.removeFromCat + '</b></a>');
$('#cat_a_lot_searchcatname').keypress(function (e) {
if (e.which == 13) catALot.updateCats($(this).val());
});
$('#cat_a_lot_remove').click(function () {
$('#cat_a_lot_remove').click(function () {
catALot.remove();
catALot.remove();
שורה 43: שורה 39:
catALot.run();
catALot.run();
});
});
 
$('#cat_a_lot_searchcatname')
$('#cat_a_lot_searchcatname').autocomplete({
.keypress(function (e) {
source: function(request, response) {
if (e.which == 13)
catALot.doAPICall({action:'opensearch', search: request.term, namespace: 14},
catALot.updateCats($(this).val());
function(data){
})
if(data[1])
.autocomplete({
response($(data[1]).map(function(index,item){return item.replace(/.*:/, '');}));
source: function(request, response) {
}
catALot.doAPICall({action:'opensearch', search: request.term, namespace: 14},
);
function(data){
},
if(data[1])
open:function(){
response($(data[1]).map(function(index,item){return item.replace(/.*:/, '');}));
$(".ui-autocomplete")
}
.position({
);
my: "left bottom",
},
at: "left top",
open:function(){
of: $('#cat_a_lot_searchcatname')
$(".ui-autocomplete")
});
.position({
}
my: "left bottom",
at: "left top",
of: $('#cat_a_lot_searchcatname')
});
}
});
});
importStylesheet('MediaWiki:Gadget-Cat-a-lot.css');
importStylesheet('MediaWiki:Gadget-Cat-a-lot.css');
שורה 167: שורה 167:
},
},
regexBuilder: function (category) {
regexBuilder: function (category) {
var catname = ( this.localCatName == 'Category' ) ? this.localCatName : this.localCatName + '|Category';
var catname = ( this.localCatName == 'Category' ) ? this.localCatName: this.localCatName + '|Category';
catname = '(' + catname + ')';
catname = '(' + catname + ')';


שורה 277: שורה 277:
};
};


var isBot=$.inArray('bot', wgUserGroups)>-1;
var isBot=$.inArray('bot', wgUserGroups)>-1;
if(isBot){
if(isBot)
  data.bot = '1';
data.bot = '1';
}
 
this.doAPICall(data, function (ret) {
this.doAPICall(data, function (ret) {
catALot.updateCounter();
catALot.updateCounter();
שורה 503: שורה 503:
i18n: (wgUserLanguage == "he") ? {
i18n: (wgUserLanguage == "he") ? {
//Progress
//Progress
loading : 'טוען...',
loading: 'טוען...',
editing : 'עורך דף',
editing: 'עורך דף',
of : 'מתוך ',
of: 'מתוך ',
skippedAlready : '<h5>הדפים להלן לא שונו, משום שכבר הכילו את הקטגוריה:</h5>',
skippedAlready: '<h5>הדפים להלן לא שונו, משום שכבר הכילו את הקטגוריה:</h5>',
skippedNotFound: '<h5>הדפים להלן לא שונו, משום שהקטגוריה לא נמצאה:</h5>',
skippedNotFound: '<h5>הדפים להלן לא שונו, משום שהקטגוריה לא נמצאה:</h5>',
skippedServer : '<h5>Tהדפים להלן לא שונו, בגלל בעית תקשורת/h5>',
skippedServer: '<h5>Tהדפים להלן לא שונו, בגלל בעית תקשורת/h5>',
allDone : 'כל הדפים שונו.',
allDone: 'כל הדפים שונו.',
done   : 'בוצע!',
done: 'בוצע!',
addedCat   : 'קטגוריה התווספה',
addedCat: 'קטגוריה התווספה',
copiedCat   : 'קטגוריה התווספה',
copiedCat: 'קטגוריה התווספה',
movedCat   : 'הועברו לקטגוריה',
movedCat: 'הועברו לקטגוריה',
removedCat : 'הוסרו מקטגוריה',
removedCat: 'הוסרו מקטגוריה',
returnToPage   : 'חזור לדף',
returnToPage: 'חזור לדף',
catNotFound : 'קטגוריה לא נמצאה.',
catNotFound: 'קטגוריה לא נמצאה.',




//as in 17 files selected
//as in 17 files selected
filesSelected   : ' דפים מסומנים.',
filesSelected: ' דפים מסומנים.',


//Actions
//Actions
copy : 'הוסף',
copy: 'הוסף',
move : 'העבר',
move: 'העבר',
add : 'הוסף',
add: 'הוסף',
removeFromCat   : 'הסרה מקטגוריה זו',
removeFromCat: 'הסרה מקטגוריה זו',
enterName   : 'שם קטגוריה להוספה לרשימה',
enterName: 'שם קטגוריה להוספה לרשימה',
select   : 'בחירה',
select: 'בחירה',
all : 'כולם',
all: 'כולם',
none : 'נקה',
none: 'נקה',


noneSelected : 'אין דפים מסומנים!',
noneSelected: 'אין דפים מסומנים!',


//Summaries:
//Summaries:
summaryAdd   : 'Cat-a-lot: הוסיף ל[[קטגוריה:',
summaryAdd: 'Cat-a-lot: הוסיף ל[[קטגוריה:',
summaryCopy : 'Cat-a-lot: העתיק מ[[קטגוריה:',
summaryCopy: 'Cat-a-lot: העתיק מ[[קטגוריה:',
to   : 'ל[[קטגוריה:',
to: 'ל[[קטגוריה:',
summaryMove : 'Cat-a-lot: העביר מ[[קטגוריה:',
summaryMove: 'Cat-a-lot: העביר מ[[קטגוריה:',
summaryRemove   : 'Cat-a-lot: הסיר מ[[קטגוריה:'
summaryRemove: 'Cat-a-lot: הסיר מ[[קטגוריה:'
} : {
}: {
//Progress
//Progress
loading : 'Loading...',
loading: 'Loading...',
editing : 'Editing page',
editing: 'Editing page',
of : 'of ',
of: 'of ',
skippedAlready : '<h5>The following pages were skipped, because the page was already in the category:</h5>',
skippedAlready: '<h5>The following pages were skipped, because the page was already in the category:</h5>',
skippedNotFound: '<h5>The following pages were skipped, because the old category could not be found:</h5>',
skippedNotFound: '<h5>The following pages were skipped, because the old category could not be found:</h5>',
skippedServer : '<h5>The following pages couldn\'t be changed, since there were problems connecting to the server:</h5>',
skippedServer: '<h5>The following pages couldn\'t be changed, since there were problems connecting to the server:</h5>',
allDone : 'All pages are processed.',
allDone: 'All pages are processed.',
done   : 'Done!',
done: 'Done!',
addedCat   : 'Added category',
addedCat: 'Added category',
copiedCat   : 'Copied to category',
copiedCat: 'Copied to category',
movedCat   : 'Moved to category',
movedCat: 'Moved to category',
removedCat : 'Removed from category',
removedCat: 'Removed from category',
returnToPage   : 'Return to page',
returnToPage: 'Return to page',
catNotFound : 'Category not found.',
catNotFound: 'Category not found.',




//as in 17 files selected
//as in 17 files selected
filesSelected   : ' files selected.',
filesSelected: ' files selected.',


//Actions
//Actions
copy : 'Copy',
copy: 'Copy',
move : 'Move',
move: 'Move',
add : 'Add',
add: 'Add',
removeFromCat   : 'Remove from this category',
removeFromCat: 'Remove from this category',
enterName   : 'Enter category name',
enterName: 'Enter category name',
select   : 'Select',
select: 'Select',
all : 'all',
all: 'all',
none : 'none',
none: 'none',


noneSelected : 'No files selected!',
noneSelected: 'No files selected!',


//Summaries:
//Summaries:
summaryAdd   : 'Cat-a-lot: Adding [[Category:',
summaryAdd: 'Cat-a-lot: Adding [[Category:',
summaryCopy : 'Cat-a-lot: Copying from [[Category:',
summaryCopy: 'Cat-a-lot: Copying from [[Category:',
to   : 'to [[Category:',
to: 'to [[Category:',
summaryMove : 'Cat-a-lot: Moving from [[Category:',
summaryMove: 'Cat-a-lot: Moving from [[Category:',
summaryRemove   : 'Cat-a-lot: Removing from [[Category:'
summaryRemove: 'Cat-a-lot: Removing from [[Category:'
}
}
};
};