# HG changeset patch
# User veltr
# Date 1342434511 -7200
# Node ID 3fe54fb581f5fa19954909dcc4dc2dd62ec9447f
# Parent 04b8157f077b8adfc2c0c61a054dac018d0077b9
Improvements in List View
diff -r 04b8157f077b -r 3fe54fb581f5 timeline/css/timeline.css
--- a/timeline/css/timeline.css Wed Jul 11 18:02:57 2012 +0200
+++ b/timeline/css/timeline.css Mon Jul 16 12:28:31 2012 +0200
@@ -385,15 +385,15 @@
}
li.Ls-Occurrence {
- border-bottom: 1px solid #cccccc; clear: both;
+ border-bottom: 1px solid #cccccc; clear: both; padding: 3px;
}
-.Ls-Occurrence-Title {
- width: 260px; float: left; font-size: 14px;
+h4.Ls-Occurrence-Title {
+ font-size: 13px; font-weight: bold;
}
-.Ls-Occurrence-Date {
- padding-top: 2px; font-size: 12px;
+p.Ls-Occ-More {
+ font-size: 12px;
}
.Ls-CrWithIcon {
diff -r 04b8157f077b -r 3fe54fb581f5 timeline/js/timeline.js
--- a/timeline/js/timeline.js Wed Jul 11 18:02:57 2012 +0200
+++ b/timeline/js/timeline.js Mon Jul 16 12:28:31 2012 +0200
@@ -220,7 +220,8 @@
+'
Filtres :
'
+ '
'
+ '
Type d\'occurrence :
'
- + '
Statut :
- À réaliser
- À valider
- Validé
'
+ + '
Statut :
- À réaliser
- À valider
- Validé
'
+ + '
Est au JT :
'
+ '
'
+ '
';
@@ -236,9 +237,10 @@
+ '{{#occurrences}}'
+ '{{#locked}}
{{/locked}}
{{/occurrences}}{{/open_cluster}}';
-Tlns.Templates.Occurrence_List = '{{#occurrences}}{{title}}
{{formatted_date}}
{{/occurrences}}';
+Tlns.Templates.Occurrence_List = '{{#occurrences}}{{title}}
'
+ + '{{formatted_date}} — {{univers.title}} — {{translated_status}} — {{#jt}}Au JT{{/jt}}{{^jt}}Hors JT{{/jt}}
{{/occurrences}}';
-Tlns.Templates.OccurrenceTooltip = '{{formatted_date}} - {{translated_status}}
'
+Tlns.Templates.OccurrenceTooltip = '{{formatted_date}} — {{translated_status}}
'
+ '{{description}}
'
// + '{{univers.mainCharacter}}{{#characters}}, {{.}}{{/characters}}
'
@@ -352,7 +354,8 @@
datePublication: Math.floor(_d / 1000),
titre: '',
idUnivers: _this.univers[_u].id,
- statut: 'a_realiser'
+ statut: 'a_realiser',
+ jt: false
}
);
_occ.just_created = true;
@@ -418,6 +421,7 @@
_this.$.find(".Ls-Main").hide();
_this.$.find(".Onglet-Ls").removeClass("active");
_this.$.find(".Onglet-Tl").addClass("active");
+ _this.throttledDrawGrid();
});
this.$.find(".Onglet-Ls").click(function() {
@@ -425,6 +429,7 @@
_this.$.find(".Tl-Main").hide();
_this.$.find(".Onglet-Tl").removeClass("active");
_this.$.find(".Onglet-Ls").addClass("active");
+ _this.throttledDrawList();
});
}
@@ -840,6 +845,7 @@
var _universfilter = this.$.find(".Ls-Univers li.Ls-Active").map(function(){return $(this).attr("data")}),
_occtypefilter = this.$.find(".Ls-Occtypes li.Ls-Active").map(function(){return $(this).attr("data")}),
_statusfilter = this.$.find(".Ls-Occstatuses li.Ls-Active").map(function(){return $(this).attr("data")}),
+ _jtfilter = this.$.find(".Ls-IsJt li.Ls-Active").map(function(){return !!+$(this).attr("data")}),
_title = this.$.find(".Ls-Search").val() || "",
_titleregexp = new RegExp( "(" + _title.replace(/(\W)/gm, "\\$1") + ")", "gim" ),
_startdate = false,
@@ -867,6 +873,7 @@
&& (_(_occtypefilter).indexOf(_occ.type) !== -1)
&& (_(_universfilter).indexOf(_occ.univers_id) !== -1)
&& (_(_statusfilter).indexOf(_occ.status) !== -1)
+ && (_(_jtfilter).indexOf(_occ.jt) !== -1)
&& ( !_fromDate || _occ.date >= _startdate )
&& ( !_toDate || _occ.date <= _enddate )
);
@@ -946,6 +953,7 @@
default:
this.status = false;
}
+ this.jt = !!+_data.JT;
this.translated_status = Tlns.Defaults.Timeline.statuses[this.status];
// this.published = (_data.publication && _data.publication == "En ligne");
// this.locked = _data.verrouille || false;