Skip to content
Snippets Groups Projects
Commit d041afbe authored by Michael Stucki's avatar Michael Stucki Committed by Christian Kuhn
Browse files

[BUGFIX] Fix inconsistent linebreaks in some files

A few files are containing inconsistent linebreaks.
Since all of these files are taken from external projects,
someone needs to make sure that they get fixed during future
imports.

Change-Id: I49e482add2f991356a4ad335f13c9c60719e9e44
Resolves: #26126
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/1661
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent ac6b768a
Branches
Tags
No related merge requests found
This diff is collapsed.
......@@ -4,51 +4,51 @@
* licensing@extjs.com
* http://www.extjs.com/license
*/
/**
* GridFilters Styles
**/
/*
.x-grid3-hd-row .ux-filtered-column {
border-left: 1px solid #C7E3B4;
border-right: 1px solid #C7E3B4;
}
.x-grid3-hd-row .ux-filtered-column .x-grid3-hd-inner {
background-image: url(../images/header_bg.gif);
}
.ux-filtered-column .x-grid3-hd-btn {
background-image: url(../images/hd-btn.gif);
}
*/
.x-grid3-hd-row td.ux-filtered-column {
font-style: italic;
font-weight: bold;
}
.ux-filtered-column.sort-asc .x-grid3-sort-icon {
background-image: url(../images/sort_filtered_asc.gif) !important;
}
.ux-filtered-column.sort-desc .x-grid3-sort-icon {
background-image: url(../images/sort_filtered_desc.gif) !important;
}
.ux-gridfilter-text-icon {
background-image: url(../images/find.png) !important;
}
/* Temporary Patch for Bug ??? */
.x-menu-list-item-indent .x-menu-item-icon {
position: relative;
top: 3px;
left: 3px;
margin-right: 10px;
}
li.x-menu-list-item-indent {
padding-left:0px;
}
li.x-menu-list-item div {
display: inline;
}
/**
* GridFilters Styles
**/
/*
.x-grid3-hd-row .ux-filtered-column {
border-left: 1px solid #C7E3B4;
border-right: 1px solid #C7E3B4;
}
.x-grid3-hd-row .ux-filtered-column .x-grid3-hd-inner {
background-image: url(../images/header_bg.gif);
}
.ux-filtered-column .x-grid3-hd-btn {
background-image: url(../images/hd-btn.gif);
}
*/
.x-grid3-hd-row td.ux-filtered-column {
font-style: italic;
font-weight: bold;
}
.ux-filtered-column.sort-asc .x-grid3-sort-icon {
background-image: url(../images/sort_filtered_asc.gif) !important;
}
.ux-filtered-column.sort-desc .x-grid3-sort-icon {
background-image: url(../images/sort_filtered_desc.gif) !important;
}
.ux-gridfilter-text-icon {
background-image: url(../images/find.png) !important;
}
/* Temporary Patch for Bug ??? */
.x-menu-list-item-indent .x-menu-item-icon {
position: relative;
top: 3px;
left: 3px;
margin-right: 10px;
}
li.x-menu-list-item-indent {
padding-left:0px;
}
li.x-menu-list-item div {
display: inline;
}
......@@ -4,17 +4,17 @@
* licensing@extjs.com
* http://www.extjs.com/license
*/
/**
* RangeMenu Styles
**/
.ux-rangemenu-gt {
background-image: url(../images/greater_than.png) !important;
}
.ux-rangemenu-lt {
background-image: url(../images/less_than.png) !important;
}
.ux-rangemenu-eq {
background-image: url(../images/equals.png) !important;
}
/**
* RangeMenu Styles
**/
.ux-rangemenu-gt {
background-image: url(../images/greater_than.png) !important;
}
.ux-rangemenu-lt {
background-image: url(../images/less_than.png) !important;
}
.ux-rangemenu-eq {
background-image: url(../images/equals.png) !important;
}
......@@ -4,100 +4,100 @@
* licensing@extjs.com
* http://www.extjs.com/license
*/
/**
* @class Ext.ux.grid.filter.BooleanFilter
* @extends Ext.ux.grid.filter.Filter
* Boolean filters use unique radio group IDs (so you can have more than one!)
* <p><b><u>Example Usage:</u></b></p>
* <pre><code>
var filters = new Ext.ux.grid.GridFilters({
...
filters: [{
// required configs
type: 'boolean',
dataIndex: 'visible'
// optional configs
defaultValue: null, // leave unselected (false selected by default)
yesText: 'Yes', // default
noText: 'No' // default
}]
});
* </code></pre>
*/
Ext.ux.grid.filter.BooleanFilter = Ext.extend(Ext.ux.grid.filter.Filter, {
/**
* @cfg {Boolean} defaultValue
* Set this to null if you do not want either option to be checked by default. Defaults to false.
*/
defaultValue : false,
/**
* @cfg {String} yesText
* Defaults to 'Yes'.
*/
yesText : 'Yes',
/**
* @cfg {String} noText
* Defaults to 'No'.
*/
noText : 'No',
/**
* @private
* Template method that is to initialize the filter and install required menu items.
*/
init : function (config) {
var gId = Ext.id();
this.options = [
new Ext.menu.CheckItem({text: this.yesText, group: gId, checked: this.defaultValue === true}),
new Ext.menu.CheckItem({text: this.noText, group: gId, checked: this.defaultValue === false})];
this.menu.add(this.options[0], this.options[1]);
for(var i=0; i<this.options.length; i++){
this.options[i].on('click', this.fireUpdate, this);
this.options[i].on('checkchange', this.fireUpdate, this);
}
},
/**
* @private
* Template method that is to get and return the value of the filter.
* @return {String} The value of this filter
*/
getValue : function () {
return this.options[0].checked;
},
/**
* @private
* Template method that is to set the value of the filter.
* @param {Object} value The value to set the filter
*/
setValue : function (value) {
this.options[value ? 0 : 1].setChecked(true);
},
/**
* @private
* Template method that is to get and return serialized filter data for
* transmission to the server.
* @return {Object/Array} An object or collection of objects containing
* key value pairs representing the current configuration of the filter.
*/
getSerialArgs : function () {
var args = {type: 'boolean', value: this.getValue()};
return args;
},
/**
* Template method that is to validate the provided Ext.data.Record
* against the filters configuration.
* @param {Ext.data.Record} record The record to validate
* @return {Boolean} true if the record is valid within the bounds
* of the filter, false otherwise.
*/
validateRecord : function (record) {
return record.get(this.dataIndex) == this.getValue();
}
/**
* @class Ext.ux.grid.filter.BooleanFilter
* @extends Ext.ux.grid.filter.Filter
* Boolean filters use unique radio group IDs (so you can have more than one!)
* <p><b><u>Example Usage:</u></b></p>
* <pre><code>
var filters = new Ext.ux.grid.GridFilters({
...
filters: [{
// required configs
type: 'boolean',
dataIndex: 'visible'
// optional configs
defaultValue: null, // leave unselected (false selected by default)
yesText: 'Yes', // default
noText: 'No' // default
}]
});
* </code></pre>
*/
Ext.ux.grid.filter.BooleanFilter = Ext.extend(Ext.ux.grid.filter.Filter, {
/**
* @cfg {Boolean} defaultValue
* Set this to null if you do not want either option to be checked by default. Defaults to false.
*/
defaultValue : false,
/**
* @cfg {String} yesText
* Defaults to 'Yes'.
*/
yesText : 'Yes',
/**
* @cfg {String} noText
* Defaults to 'No'.
*/
noText : 'No',
/**
* @private
* Template method that is to initialize the filter and install required menu items.
*/
init : function (config) {
var gId = Ext.id();
this.options = [
new Ext.menu.CheckItem({text: this.yesText, group: gId, checked: this.defaultValue === true}),
new Ext.menu.CheckItem({text: this.noText, group: gId, checked: this.defaultValue === false})];
this.menu.add(this.options[0], this.options[1]);
for(var i=0; i<this.options.length; i++){
this.options[i].on('click', this.fireUpdate, this);
this.options[i].on('checkchange', this.fireUpdate, this);
}
},
/**
* @private
* Template method that is to get and return the value of the filter.
* @return {String} The value of this filter
*/
getValue : function () {
return this.options[0].checked;
},
/**
* @private
* Template method that is to set the value of the filter.
* @param {Object} value The value to set the filter
*/
setValue : function (value) {
this.options[value ? 0 : 1].setChecked(true);
},
/**
* @private
* Template method that is to get and return serialized filter data for
* transmission to the server.
* @return {Object/Array} An object or collection of objects containing
* key value pairs representing the current configuration of the filter.
*/
getSerialArgs : function () {
var args = {type: 'boolean', value: this.getValue()};
return args;
},
/**
* Template method that is to validate the provided Ext.data.Record
* against the filters configuration.
* @param {Ext.data.Record} record The record to validate
* @return {Boolean} true if the record is valid within the bounds
* of the filter, false otherwise.
*/
validateRecord : function (record) {
return record.get(this.dataIndex) == this.getValue();
}
});
\ No newline at end of file
......@@ -4,310 +4,310 @@
* licensing@extjs.com
* http://www.extjs.com/license
*/
/**
* @class Ext.ux.grid.filter.DateFilter
* @extends Ext.ux.grid.filter.Filter
* Filter by a configurable Ext.menu.DateMenu
* <p><b><u>Example Usage:</u></b></p>
* <pre><code>
var filters = new Ext.ux.grid.GridFilters({
...
filters: [{
// required configs
type: 'date',
dataIndex: 'dateAdded',
// optional configs
dateFormat: 'm/d/Y', // default
beforeText: 'Before', // default
afterText: 'After', // default
onText: 'On', // default
pickerOpts: {
// any DateMenu configs
},
active: true // default is false
}]
});
* </code></pre>
*/
Ext.ux.grid.filter.DateFilter = Ext.extend(Ext.ux.grid.filter.Filter, {
/**
* @cfg {String} afterText
* Defaults to 'After'.
*/
afterText : 'After',
/**
* @cfg {String} beforeText
* Defaults to 'Before'.
*/
beforeText : 'Before',
/**
* @cfg {Object} compareMap
* Map for assigning the comparison values used in serialization.
*/
compareMap : {
before: 'lt',
after: 'gt',
on: 'eq'
},
/**
* @cfg {String} dateFormat
* The date format to return when using getValue.
* Defaults to 'm/d/Y'.
*/
dateFormat : 'm/d/Y',
/**
* @cfg {Date} maxDate
* Allowable date as passed to the Ext.DatePicker
* Defaults to undefined.
*/
/**
* @cfg {Date} minDate
* Allowable date as passed to the Ext.DatePicker
* Defaults to undefined.
*/
/**
* @cfg {Array} menuItems
* The items to be shown in this menu
* Defaults to:<pre>
* menuItems : ['before', 'after', '-', 'on'],
* </pre>
*/
menuItems : ['before', 'after', '-', 'on'],
/**
* @cfg {Object} menuItemCfgs
* Default configuration options for each menu item
*/
menuItemCfgs : {
selectOnFocus: true,
width: 125
},
/**
* @cfg {String} onText
* Defaults to 'On'.
*/
onText : 'On',
/**
* @cfg {Object} pickerOpts
* Configuration options for the date picker associated with each field.
*/
pickerOpts : {},
/**
* @private
* Template method that is to initialize the filter and install required menu items.
*/
init : function (config) {
var menuCfg, i, len, item, cfg, Cls;
menuCfg = Ext.apply(this.pickerOpts, {
minDate: this.minDate,
maxDate: this.maxDate,
format: this.dateFormat,
listeners: {
scope: this,
select: this.onMenuSelect
}
});
this.fields = {};
for (i = 0, len = this.menuItems.length; i < len; i++) {
item = this.menuItems[i];
if (item !== '-') {
cfg = {
itemId: 'range-' + item,
text: this[item + 'Text'],
menu: new Ext.menu.DateMenu(
Ext.apply(menuCfg, {
itemId: item
})
),
listeners: {
scope: this,
checkchange: this.onCheckChange
}
};
Cls = Ext.menu.CheckItem;
item = this.fields[item] = new Cls(cfg);
}
//this.add(item);
this.menu.add(item);
}
},
onCheckChange : function () {
this.setActive(this.isActivatable());
this.fireEvent('update', this);
},
/**
* @private
* Handler method called when there is a keyup event on an input
* item of this menu.
*/
onInputKeyUp : function (field, e) {
var k = e.getKey();
if (k == e.RETURN && field.isValid()) {
e.stopEvent();
this.menu.hide(true);
return;
}
},
/**
* Handler for when the menu for a field fires the 'select' event
* @param {Object} date
* @param {Object} menuItem
* @param {Object} value
* @param {Object} picker
*/
onMenuSelect : function (menuItem, value, picker) {
var fields = this.fields,
field = this.fields[menuItem.itemId];
field.setChecked(true);
if (field == fields.on) {
fields.before.setChecked(false, true);
fields.after.setChecked(false, true);
} else {
fields.on.setChecked(false, true);
if (field == fields.after && fields.before.menu.picker.value < value) {
fields.before.setChecked(false, true);
} else if (field == fields.before && fields.after.menu.picker.value > value) {
fields.after.setChecked(false, true);
}
}
this.fireEvent('update', this);
},
/**
* @private
* Template method that is to get and return the value of the filter.
* @return {String} The value of this filter
*/
getValue : function () {
var key, result = {};
for (key in this.fields) {
if (this.fields[key].checked) {
result[key] = this.fields[key].menu.picker.getValue();
}
}
return result;
},
/**
* @private
* Template method that is to set the value of the filter.
* @param {Object} value The value to set the filter
* @param {Boolean} preserve true to preserve the checked status
* of the other fields. Defaults to false, unchecking the
* other fields
*/
setValue : function (value, preserve) {
var key;
for (key in this.fields) {
if(value[key]){
this.fields[key].menu.picker.setValue(value[key]);
this.fields[key].setChecked(true);
} else if (!preserve) {
this.fields[key].setChecked(false);
}
}
this.fireEvent('update', this);
},
/**
* @private
* Template method that is to return <tt>true</tt> if the filter
* has enough configuration information to be activated.
* @return {Boolean}
*/
isActivatable : function () {
var key;
for (key in this.fields) {
if (this.fields[key].checked) {
return true;
}
}
return false;
},
/**
* @private
* Template method that is to get and return serialized filter data for
* transmission to the server.
* @return {Object/Array} An object or collection of objects containing
* key value pairs representing the current configuration of the filter.
*/
getSerialArgs : function () {
var args = [];
for (var key in this.fields) {
if(this.fields[key].checked){
args.push({
type: 'date',
comparison: this.compareMap[key],
value: this.getFieldValue(key).format(this.dateFormat)
});
}
}
return args;
},
/**
* Get and return the date menu picker value
* @param {String} item The field identifier ('before', 'after', 'on')
* @return {Date} Gets the current selected value of the date field
*/
getFieldValue : function(item){
return this.fields[item].menu.picker.getValue();
},
/**
* Gets the menu picker associated with the passed field
* @param {String} item The field identifier ('before', 'after', 'on')
* @return {Object} The menu picker
*/
getPicker : function(item){
return this.fields[item].menu.picker;
},
/**
* Template method that is to validate the provided Ext.data.Record
* against the filters configuration.
* @param {Ext.data.Record} record The record to validate
* @return {Boolean} true if the record is valid within the bounds
* of the filter, false otherwise.
*/
validateRecord : function (record) {
var key,
pickerValue,
val = record.get(this.dataIndex);
if(!Ext.isDate(val)){
return false;
}
val = val.clearTime(true).getTime();
for (key in this.fields) {
if (this.fields[key].checked) {
pickerValue = this.getFieldValue(key).clearTime(true).getTime();
if (key == 'before' && pickerValue <= val) {
return false;
}
if (key == 'after' && pickerValue >= val) {
return false;
}
if (key == 'on' && pickerValue != val) {
return false;
}
}
}
return true;
}
/**
* @class Ext.ux.grid.filter.DateFilter
* @extends Ext.ux.grid.filter.Filter
* Filter by a configurable Ext.menu.DateMenu
* <p><b><u>Example Usage:</u></b></p>
* <pre><code>
var filters = new Ext.ux.grid.GridFilters({
...
filters: [{
// required configs
type: 'date',
dataIndex: 'dateAdded',
// optional configs
dateFormat: 'm/d/Y', // default
beforeText: 'Before', // default
afterText: 'After', // default
onText: 'On', // default
pickerOpts: {
// any DateMenu configs
},
active: true // default is false
}]
});
* </code></pre>
*/
Ext.ux.grid.filter.DateFilter = Ext.extend(Ext.ux.grid.filter.Filter, {
/**
* @cfg {String} afterText
* Defaults to 'After'.
*/
afterText : 'After',
/**
* @cfg {String} beforeText
* Defaults to 'Before'.
*/
beforeText : 'Before',
/**
* @cfg {Object} compareMap
* Map for assigning the comparison values used in serialization.
*/
compareMap : {
before: 'lt',
after: 'gt',
on: 'eq'
},
/**
* @cfg {String} dateFormat
* The date format to return when using getValue.
* Defaults to 'm/d/Y'.
*/
dateFormat : 'm/d/Y',
/**
* @cfg {Date} maxDate
* Allowable date as passed to the Ext.DatePicker
* Defaults to undefined.
*/
/**
* @cfg {Date} minDate
* Allowable date as passed to the Ext.DatePicker
* Defaults to undefined.
*/
/**
* @cfg {Array} menuItems
* The items to be shown in this menu
* Defaults to:<pre>
* menuItems : ['before', 'after', '-', 'on'],
* </pre>
*/
menuItems : ['before', 'after', '-', 'on'],
/**
* @cfg {Object} menuItemCfgs
* Default configuration options for each menu item
*/
menuItemCfgs : {
selectOnFocus: true,
width: 125
},
/**
* @cfg {String} onText
* Defaults to 'On'.
*/
onText : 'On',
/**
* @cfg {Object} pickerOpts
* Configuration options for the date picker associated with each field.
*/
pickerOpts : {},
/**
* @private
* Template method that is to initialize the filter and install required menu items.
*/
init : function (config) {
var menuCfg, i, len, item, cfg, Cls;
menuCfg = Ext.apply(this.pickerOpts, {
minDate: this.minDate,
maxDate: this.maxDate,
format: this.dateFormat,
listeners: {
scope: this,
select: this.onMenuSelect
}
});
this.fields = {};
for (i = 0, len = this.menuItems.length; i < len; i++) {
item = this.menuItems[i];
if (item !== '-') {
cfg = {
itemId: 'range-' + item,
text: this[item + 'Text'],
menu: new Ext.menu.DateMenu(
Ext.apply(menuCfg, {
itemId: item
})
),
listeners: {
scope: this,
checkchange: this.onCheckChange
}
};
Cls = Ext.menu.CheckItem;
item = this.fields[item] = new Cls(cfg);
}
//this.add(item);
this.menu.add(item);
}
},
onCheckChange : function () {
this.setActive(this.isActivatable());
this.fireEvent('update', this);
},
/**
* @private
* Handler method called when there is a keyup event on an input
* item of this menu.
*/
onInputKeyUp : function (field, e) {
var k = e.getKey();
if (k == e.RETURN && field.isValid()) {
e.stopEvent();
this.menu.hide(true);
return;
}
},
/**
* Handler for when the menu for a field fires the 'select' event
* @param {Object} date
* @param {Object} menuItem
* @param {Object} value
* @param {Object} picker
*/
onMenuSelect : function (menuItem, value, picker) {
var fields = this.fields,
field = this.fields[menuItem.itemId];
field.setChecked(true);
if (field == fields.on) {
fields.before.setChecked(false, true);
fields.after.setChecked(false, true);
} else {
fields.on.setChecked(false, true);
if (field == fields.after && fields.before.menu.picker.value < value) {
fields.before.setChecked(false, true);
} else if (field == fields.before && fields.after.menu.picker.value > value) {
fields.after.setChecked(false, true);
}
}
this.fireEvent('update', this);
},
/**
* @private
* Template method that is to get and return the value of the filter.
* @return {String} The value of this filter
*/
getValue : function () {
var key, result = {};
for (key in this.fields) {
if (this.fields[key].checked) {
result[key] = this.fields[key].menu.picker.getValue();
}
}
return result;
},
/**
* @private
* Template method that is to set the value of the filter.
* @param {Object} value The value to set the filter
* @param {Boolean} preserve true to preserve the checked status
* of the other fields. Defaults to false, unchecking the
* other fields
*/
setValue : function (value, preserve) {
var key;
for (key in this.fields) {
if(value[key]){
this.fields[key].menu.picker.setValue(value[key]);
this.fields[key].setChecked(true);
} else if (!preserve) {
this.fields[key].setChecked(false);
}
}
this.fireEvent('update', this);
},
/**
* @private
* Template method that is to return <tt>true</tt> if the filter
* has enough configuration information to be activated.
* @return {Boolean}
*/
isActivatable : function () {
var key;
for (key in this.fields) {
if (this.fields[key].checked) {
return true;
}
}
return false;
},
/**
* @private
* Template method that is to get and return serialized filter data for
* transmission to the server.
* @return {Object/Array} An object or collection of objects containing
* key value pairs representing the current configuration of the filter.
*/
getSerialArgs : function () {
var args = [];
for (var key in this.fields) {
if(this.fields[key].checked){
args.push({
type: 'date',
comparison: this.compareMap[key],
value: this.getFieldValue(key).format(this.dateFormat)
});
}
}
return args;
},
/**
* Get and return the date menu picker value
* @param {String} item The field identifier ('before', 'after', 'on')
* @return {Date} Gets the current selected value of the date field
*/
getFieldValue : function(item){
return this.fields[item].menu.picker.getValue();
},
/**
* Gets the menu picker associated with the passed field
* @param {String} item The field identifier ('before', 'after', 'on')
* @return {Object} The menu picker
*/
getPicker : function(item){
return this.fields[item].menu.picker;
},
/**
* Template method that is to validate the provided Ext.data.Record
* against the filters configuration.
* @param {Ext.data.Record} record The record to validate
* @return {Boolean} true if the record is valid within the bounds
* of the filter, false otherwise.
*/
validateRecord : function (record) {
var key,
pickerValue,
val = record.get(this.dataIndex);
if(!Ext.isDate(val)){
return false;
}
val = val.clearTime(true).getTime();
for (key in this.fields) {
if (this.fields[key].checked) {
pickerValue = this.getFieldValue(key).clearTime(true).getTime();
if (key == 'before' && pickerValue <= val) {
return false;
}
if (key == 'after' && pickerValue >= val) {
return false;
}
if (key == 'on' && pickerValue != val) {
return false;
}
}
}
return true;
}
});
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment