« MediaWiki:Common-IntersectionCategorie.js » : différence entre les versions
Contenu supprimé Contenu ajouté
mAucun résumé des modifications |
mAucun résumé des modifications |
||
Ligne 12 :
* submit_button: place of the submit button
* output_result: place of the query result.
* next_link1, next_link2, prev_link1, prev_link2: place of previous/next link,
* the text of the html element of these fields are kept as it.
*/
var intersection_categorie = {
Ligne 17 ⟶ 19 :
* TODO :
*
*
*
*
*
*
*▼
* DynamicPageList ne permet pas d’obtenir les textes d’économies
* qui sont dans la cat 00% et 25% mais on peut obtenir la même
Ligne 32 ⟶ 29 :
* économie et qui ne sont pas dans les cats 50%, 75% et 100%
*
*▼
▲ * 7) permettre de voir la date d’entrée de chaque page dans la première
* catégorie sélectionné ?
*
*
* dynamiquement, mais c’est faisable. Mais dans ce cas suivi des pages
* liées ne montrera que le suivi des liens pour les liens visibles
Ligne 181 ⟶ 174 :
nocat : [],
cat : [],
count :
offset : 0
};
Ligne 188 ⟶ 181 :
add_dpl_result_to_page : function (datas) {
$("#output_result").html(datas.parse.text["*"]);
var query = this.
if (query.cat.length)
this.set_selected(query.cat, this.get_cat_group(), "select_cat");
Ligne 208 ⟶ 201 :
if (query.offset)
url += "&offset=" + query.offset;
if (query.count != 200)
url += "&count=" + query.count;
return url;
Ligne 265 ⟶ 258 :
},
var str = location.search;
var query = this.default_query();
Ligne 287 ⟶ 281 :
},
var
if (
this.dpl_query(
},
guess_cat_group_from_url : function() {
var
if (
for (var group in this.possible_intersection) {
var possible_cat = this.possible_intersection[group];
for (var i = 0; i < possible_cat.length; ++i) {
if (
return group;
}
}
}
// FIXME: must be the string of the first group defined in
// this.possible_intersection
return "Intersection d’auteurs";
},
Ligne 323 ⟶ 319 :
add_submit_button : function() {
$("#submit_button").html("<button type='button' onclick='intersection_categorie.exec_user_query()'>Exécuter la requête</button>");
add_prev_next_link : function () {
var query = this.query_from_url();
if (query.offset) {
var old_offset = query.offset;
query.offset = Math.min(query.offset - 200, 0);
var url = this.build_url(query);
$("#prev_link1").html("<a href='" + url + "'>" + $("#prev_link1").text() + "</a>");
$("#prev_link2").html("<a href='" + url + "'>" + $("#prev_link2").text() + "</a>");
query.offset = old_offset;
// it's difficult to ascertain if the next link will not provide empty results w/o querying one more item than
// count and checking if the last item off by one exists...
query.offset += 200;
var url = this.build_url(query);
$("#next_link1").html("<a href='" + url + "'>" + $("#next_link1").text() + "</a>");
$("#next_link2").html("<a href='" + url + "'>" + $("#next_link2").text() + "</a>");
},
Ligne 333 ⟶ 347 :
this.add_submit_button();
this.add_dropdown_list();
this.
this.add_prev_next_link();
}
}
|