Révision 1928

tmp/org.txm.setups/SUBVERSION (revision 1928)
1
b4
tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/preferences/SynopticEditionPreferences.java (revision 1928)
34 34
	public void initializeDefaultPreferences() {
35 35
		super.initializeDefaultPreferences();
36 36
		Preferences preferences = this.getDefaultPreferencesNode();
37
		preferences.putBoolean(FAST_HIGHLIGHT, true);
37
		preferences.putBoolean(FAST_HIGHLIGHT, false);
38 38
	}
39 39
}
tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/EditionPanel.java (revision 1928)
187 187
					+"\ntry{" //$NON-NLS-1$
188 188
					+"\n	var style = document.createElement(\"style\");" //$NON-NLS-1$
189 189
					+"\n	try { style.appendChild(document.createTextNode(\"\")); } catch (e) {};"//webkit hack //$NON-NLS-1$
190
					+"\n	document.head.appendChild(style);" //$NON-NLS-1$
190
					+"\n	document.body.appendChild(style);" //$NON-NLS-1$
191 191
					+"\n	sheet = style.sheet;" //$NON-NLS-1$
192 192
					+"\n} catch(e) {sheet='error'}" //$NON-NLS-1$
193 193
					+"\ntry{" //$NON-NLS-1$
tmp/org.txm.edition.rcp/res/js/functions.js (revision 1928)
133 133
try {
134 134
	if ("undefined" == typeof sheet || "undefined" == typeof txmstyle) {
135 135
		txmstyle = document.createElement("style");
136
		txmstyle.title="txm_btt"
137
		try { txmstyle.appendChild(document.createTextNode("")); } catch (e) {};
138
		document.head.appendChild(txmstyle);
136
		txmstyle.title = "txm_btt"
137
		try {
138
			txmstyle.appendChild(document.createTextNode(""));
139
		} catch (e) {
140
		}
141
		
142
		document.body.appendChild(txmstyle);
139 143
		sheet = txmstyle.sheet;
140 144
	}
141 145
} catch (e) {
142 146
	sheet = 'error';
143 147
}
144 148

  
145
//try {
149
// try {
146 150

  
147
//if (!Element.prototype.scrollIntoViewIfNeeded) {
148
//Element.prototype.scrollIntoViewIfNeeded = Element.prototype.scrollIntoView;
149
////Element.prototype.scrollIntoViewIfNeeded = function(centerIfNeeded) {
150
////centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;
151
////var parent = this.parentNode, parentComputedStyle = window
152
////.getComputedStyle(parent, null), parentBorderTopWidth = parseInt(parentComputedStyle
153
////.getPropertyValue('border-top-width')), parentBorderLeftWidth = parseInt(parentComputedStyle
154
////.getPropertyValue('border-left-width')), overTop = this.offsetTop
155
////- parent.offsetTop < parent.scrollTop, overBottom = (this.offsetTop
156
////- parent.offsetTop + this.clientHeight - parentBorderTopWidth) > (parent.scrollTop + parent.clientHeight), overLeft = this.offsetLeft
157
////- parent.offsetLeft < parent.scrollLeft, overRight = (this.offsetLeft
158
////- parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) > (parent.scrollLeft + parent.clientWidth), alignWithTop = overTop
159
////&& !overBottom;
160
////if ((overTop || overBottom) && centerIfNeeded) {
161
////parent.scrollTop = this.offsetTop - parent.offsetTop
162
////- parent.clientHeight / 2 - parentBorderTopWidth
163
////+ this.clientHeight / 2;
164
////}
165
////if ((overLeft || overRight) && centerIfNeeded) {
166
////parent.scrollLeft = this.offsetLeft - parent.offsetLeft
167
////- parent.clientWidth / 2 - parentBorderLeftWidth
168
////+ this.clientWidth / 2;
169
////}
170
////if ((overTop || overBottom || overLeft || overRight)
171
////&& !centerIfNeeded) {
172
////this.scrollIntoView(alignWithTop);
173
////}
174
////};
175
//}
176
//} catch (e) {
177
//Element.prototype.scrollIntoViewIfNeeded = Element.prototype.scrollIntoView
178
//}
151
// if (!Element.prototype.scrollIntoViewIfNeeded) {
152
// Element.prototype.scrollIntoViewIfNeeded = Element.prototype.scrollIntoView;
153
// //Element.prototype.scrollIntoViewIfNeeded = function(centerIfNeeded) {
154
// //centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;
155
// //var parent = this.parentNode, parentComputedStyle = window
156
// //.getComputedStyle(parent, null), parentBorderTopWidth =
157
// parseInt(parentComputedStyle
158
// //.getPropertyValue('border-top-width')), parentBorderLeftWidth =
159
// parseInt(parentComputedStyle
160
// //.getPropertyValue('border-left-width')), overTop = this.offsetTop
161
// //- parent.offsetTop < parent.scrollTop, overBottom = (this.offsetTop
162
// //- parent.offsetTop + this.clientHeight - parentBorderTopWidth) >
163
// (parent.scrollTop + parent.clientHeight), overLeft = this.offsetLeft
164
// //- parent.offsetLeft < parent.scrollLeft, overRight = (this.offsetLeft
165
// //- parent.offsetLeft + this.clientWidth - parentBorderLeftWidth) >
166
// (parent.scrollLeft + parent.clientWidth), alignWithTop = overTop
167
// //&& !overBottom;
168
// //if ((overTop || overBottom) && centerIfNeeded) {
169
// //parent.scrollTop = this.offsetTop - parent.offsetTop
170
// //- parent.clientHeight / 2 - parentBorderTopWidth
171
// //+ this.clientHeight / 2;
172
// //}
173
// //if ((overLeft || overRight) && centerIfNeeded) {
174
// //parent.scrollLeft = this.offsetLeft - parent.offsetLeft
175
// //- parent.clientWidth / 2 - parentBorderLeftWidth
176
// //+ this.clientWidth / 2;
177
// //}
178
// //if ((overTop || overBottom || overLeft || overRight)
179
// //&& !centerIfNeeded) {
180
// //this.scrollIntoView(alignWithTop);
181
// //}
182
// //};
183
// }
184
// } catch (e) {
185
// Element.prototype.scrollIntoViewIfNeeded = Element.prototype.scrollIntoView
186
// }
179 187

  
180 188
function showElementIfNeeded(el) {
181 189
	if (!Element.prototype.scrollIntoViewIfNeeded) {
182
		if (!isAnyPartOfElementInViewport(el)) el.scrollIntoView(false);
190
		if (!isAnyPartOfElementInViewport(el))
191
			el.scrollIntoView(false);
183 192
	} else {
184 193
		el.scrollIntoViewIfNeeded();
185 194
	}
186 195
}
187 196

  
188 197
function isAnyPartOfElementInViewport(el) {
189
	try { 
198
	try {
190 199
		const rect = el.getBoundingClientRect();
191
		// 	DOMRect { x: 8, y: 8, width: 100, height: 100, top: 8, right: 108, bottom: 108, left: 8 }
200
		// DOMRect { x: 8, y: 8, width: 100, height: 100, top: 8, right: 108,
201
		// bottom: 108, left: 8 }
192 202
		const windowHeight = (window.innerHeight || document.documentElement.clientHeight);
193 203
		const windowWidth = (window.innerWidth || document.documentElement.clientWidth);
194 204

  
195 205
		// http://stackoverflow.com/questions/325933/determine-whether-two-date-ranges-overlap
196
		const vertInView = (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0);
197
		const horInView = (rect.left <= windowWidth) && ((rect.left + rect.width) >= 0);
206
		const vertInView = (rect.top <= windowHeight)
207
				&& ((rect.top + rect.height) >= 0);
208
		const horInView = (rect.left <= windowWidth)
209
				&& ((rect.left + rect.width) >= 0);
198 210

  
199 211
		return (vertInView && horInView);
200 212
	} catch (e) {
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 1928)
48 48

  
49 49
advancedUserMode = Advanced user mode
50 50

  
51
allCriteria = All criteria
51
allCriteria = All criteria (&)
52 52

  
53 53
alwaysSaveBeforeLaunching = Always save before launching
54 54

  
......
833 833

  
834 834
simple = Simple
835 835

  
836
someCriteria = Some criteria
836
someCriteria = Some criteria (|)
837 837

  
838 838
sort = Sort
839 839

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 1928)
46 46

  
47 47
advancedUserMode = Mode avancé
48 48

  
49
allCriteria = Tous les critères
49
allCriteria = Tous les critères ensembles (&)
50 50

  
51 51
alwaysSaveBeforeLaunching = Toujours sauvegarder avant de lancer
52 52

  
......
833 833

  
834 834
simple = Simple
835 835

  
836
someCriteria = Certains critères
836
someCriteria = Certains critères (|)
837 837

  
838 838
sort = Tri
839 839

  

Formats disponibles : Unified diff