Resolved merge conflicts
This commit is contained in:
commit
5e477a58a2
38 changed files with 212 additions and 180 deletions
|
|
@ -32,7 +32,7 @@
|
|||
"src": [
|
||||
"<%= dirs.js.node_modules %>/jquery/dist/jquery.min.js",
|
||||
"<%= dirs.js.node_modules %>/mousetrap/mousetrap.min.js",
|
||||
"<%= dirs.js.node_modules %>/moment/min/moment.min.js",
|
||||
"<%= dirs.js.node_modules %>/luxon/build/global/luxon.min.js",
|
||||
"<%= dirs.js.node_modules %>/clipboard/dist/clipboard.min.js",
|
||||
"<%= dirs.js.node_modules %>/favico.js/favico-0.3.10.min.js",
|
||||
"<%= dirs.js.node_modules %>/dropzone/dist/min/dropzone.min.js",
|
||||
|
|
|
|||
66
package-lock.json
generated
66
package-lock.json
generated
|
|
@ -47,10 +47,11 @@
|
|||
"html-loader": "^0.4.4",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"imports-loader": "^0.7.1",
|
||||
"jquery": "1.11.3",
|
||||
"install": "^0.13.0",
|
||||
"jquery": "^3.7.1",
|
||||
"jshint": "^2.9.1-rc3",
|
||||
"luxon": "^3.7.2",
|
||||
"mark.js": "8.11.1",
|
||||
"moment": "^2.18.1",
|
||||
"mousetrap": "^1.6.1",
|
||||
"polymer-webpack-loader": "^2.0.1",
|
||||
"raw-loader": "1.0.0-beta.0",
|
||||
|
|
@ -6041,6 +6042,15 @@
|
|||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/install": {
|
||||
"version": "0.13.0",
|
||||
"resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz",
|
||||
"integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/internal-slot": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
|
||||
|
|
@ -6683,11 +6693,11 @@
|
|||
"optional": true
|
||||
},
|
||||
"node_modules/jquery": {
|
||||
"version": "1.11.3",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-1.11.3.tgz",
|
||||
"integrity": "sha512-pHM/XLofp0FJc0/0AsRm8q/5ob+a1kno+vfclXGozaMBPv3qD7Xq19loECVcBB4MOLdygnyneQMPTsH5QiVNBQ==",
|
||||
"deprecated": "This version is deprecated. Please upgrade to the latest version or find support at https://www.herodevs.com/support/jquery-nes.",
|
||||
"dev": true
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/js-base64": {
|
||||
"version": "2.6.4",
|
||||
|
|
@ -7148,6 +7158,15 @@
|
|||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/luxon": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz",
|
||||
"integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/make-dir": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
|
||||
|
|
@ -7464,15 +7483,6 @@
|
|||
"mkdirp": "bin/cmd.js"
|
||||
}
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.30.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/mousetrap": {
|
||||
"version": "1.6.5",
|
||||
"resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz",
|
||||
|
|
@ -17643,6 +17653,12 @@
|
|||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"dev": true
|
||||
},
|
||||
"install": {
|
||||
"version": "0.13.0",
|
||||
"resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz",
|
||||
"integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==",
|
||||
"dev": true
|
||||
},
|
||||
"internal-slot": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
|
||||
|
|
@ -18083,9 +18099,9 @@
|
|||
"optional": true
|
||||
},
|
||||
"jquery": {
|
||||
"version": "1.11.3",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-1.11.3.tgz",
|
||||
"integrity": "sha512-pHM/XLofp0FJc0/0AsRm8q/5ob+a1kno+vfclXGozaMBPv3qD7Xq19loECVcBB4MOLdygnyneQMPTsH5QiVNBQ==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
|
||||
"dev": true
|
||||
},
|
||||
"js-base64": {
|
||||
|
|
@ -18470,6 +18486,12 @@
|
|||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"luxon": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz",
|
||||
"integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==",
|
||||
"dev": true
|
||||
},
|
||||
"make-dir": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
|
||||
|
|
@ -18733,12 +18755,6 @@
|
|||
"minimist": "^1.2.6"
|
||||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.30.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||
"dev": true
|
||||
},
|
||||
"mousetrap": {
|
||||
"version": "1.6.5",
|
||||
"resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz",
|
||||
|
|
|
|||
|
|
@ -43,10 +43,11 @@
|
|||
"html-loader": "^0.4.4",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"imports-loader": "^0.7.1",
|
||||
"jquery": "1.11.3",
|
||||
"install": "^0.13.0",
|
||||
"jquery": "^3.7.1",
|
||||
"jshint": "^2.9.1-rc3",
|
||||
"luxon": "^3.7.2",
|
||||
"mark.js": "8.11.1",
|
||||
"moment": "^2.18.1",
|
||||
"mousetrap": "^1.6.1",
|
||||
"polymer-webpack-loader": "^2.0.1",
|
||||
"raw-loader": "1.0.0-beta.0",
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
}
|
||||
var stringMatch
|
||||
if (stringMatch = stream.match(/("""|"|')/)) {
|
||||
var tokenize = tokenString.bind(null, stringMatch[0])
|
||||
var tokenize = tokenString.on(null, stringMatch[0])
|
||||
state.tokenize.push(tokenize)
|
||||
return tokenize(stream, state)
|
||||
}
|
||||
|
|
|
|||
2
rhodecode/public/js/src/bootstrap.js
vendored
2
rhodecode/public/js/src/bootstrap.js
vendored
|
|
@ -745,7 +745,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
|
|||
|
||||
if (!isActive || (isActive && e.keyCode == 27)) {
|
||||
if (e.which == 27) $parent.find(toggle).focus()
|
||||
return $this.click()
|
||||
return $this.trigger('click')
|
||||
}
|
||||
|
||||
var $items = $('[role=menu] li:not(.divider):visible a', $parent)
|
||||
|
|
|
|||
|
|
@ -9660,7 +9660,7 @@
|
|||
var wrappedSubmit = form.submit = function () {
|
||||
save();
|
||||
form.submit = realSubmit;
|
||||
form.submit();
|
||||
form.trigger('submit');
|
||||
form.submit = wrappedSubmit;
|
||||
};
|
||||
} catch(e) {}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
testSubject.insertAfter(input);
|
||||
|
||||
$(this).bind('keyup keydown blur update', check);
|
||||
$(this).on('keyup keydown blur update', check);
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@
|
|||
|
||||
$.extend(options, suppliedOptions);
|
||||
|
||||
that.isLocal = $.isArray(options.lookup);
|
||||
that.isLocal = Array.isArray(options.lookup);
|
||||
|
||||
if (that.isLocal) {
|
||||
options.lookup = that.verifySuggestionsFormat(options.lookup);
|
||||
|
|
@ -525,14 +525,14 @@
|
|||
if (that.isLocal) {
|
||||
response = that.getSuggestionsLocal(query);
|
||||
} else {
|
||||
if ($.isFunction(serviceUrl)) {
|
||||
if (typeof serviceUrl === 'function') {
|
||||
serviceUrl = serviceUrl.call(that.element, query);
|
||||
}
|
||||
|
||||
var callParams = {};
|
||||
//make an evaluated copy of params
|
||||
$.each(params, function(index, value) {
|
||||
if($.isFunction(value)){
|
||||
if(typeof value === 'function'){
|
||||
callParams[index] = value();
|
||||
}
|
||||
else {
|
||||
|
|
@ -544,7 +544,7 @@
|
|||
response = that.cachedResponse[cacheKey];
|
||||
}
|
||||
|
||||
if (response && $.isArray(response.suggestions)) {
|
||||
if (response && Array.isArray(response.suggestions)) {
|
||||
that.suggestions = response.suggestions;
|
||||
that.suggest();
|
||||
} else if (!that.isBadQuery(query)) {
|
||||
|
|
@ -658,7 +658,7 @@
|
|||
container.children().first().addClass(classSelected);
|
||||
}
|
||||
|
||||
if ($.isFunction(beforeRender)) {
|
||||
if (typeof beforeRender === 'function') {
|
||||
beforeRender.call(that.element, container);
|
||||
}
|
||||
|
||||
|
|
@ -886,7 +886,7 @@
|
|||
that.suggestions = [];
|
||||
that.selection = suggestion;
|
||||
|
||||
if ($.isFunction(onSelectCallback)) {
|
||||
if (typeof onSelectCallback === 'function') {
|
||||
onSelectCallback.call(this, that.element, suggestion, prevElem);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@
|
|||
var api = this.api( true );
|
||||
|
||||
/* Check if we want to add multiple rows or not */
|
||||
var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
|
||||
var rows = Array.isArray(data) && ( Array.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
|
||||
api.rows.add( data ) :
|
||||
api.row.add( data );
|
||||
|
||||
|
|
@ -337,7 +337,7 @@
|
|||
* var oTable;
|
||||
*
|
||||
* // 'open' an information row when a row is clicked on
|
||||
* $('#example tbody tr').click( function () {
|
||||
* $('#example tbody tr').on('click', function () {
|
||||
* if ( oTable.fnIsOpen(this) ) {
|
||||
* oTable.fnClose( this );
|
||||
* } else {
|
||||
|
|
@ -489,7 +489,7 @@
|
|||
* $(document).ready(function() {
|
||||
* oTable = $('#example').dataTable();
|
||||
*
|
||||
* oTable.$('tr').click( function () {
|
||||
* oTable.$('tr').on('click', function () {
|
||||
* var data = oTable.fnGetData( this );
|
||||
* // ... do something with the array / object of data for the row
|
||||
* } );
|
||||
|
|
@ -500,7 +500,7 @@
|
|||
* $(document).ready(function() {
|
||||
* oTable = $('#example').dataTable();
|
||||
*
|
||||
* oTable.$('td').click( function () {
|
||||
* oTable.$('td').on('click', function () {
|
||||
* var sData = oTable.fnGetData( this );
|
||||
* alert( 'The cell clicked on had the value of '+sData );
|
||||
* } );
|
||||
|
|
@ -562,7 +562,7 @@
|
|||
*
|
||||
* @example
|
||||
* $(document).ready(function() {
|
||||
* $('#example tbody td').click( function () {
|
||||
* $('#example tbody td').on('click', function () {
|
||||
* // Get the position of the current data from the node
|
||||
* var aPos = oTable.fnGetPosition( this );
|
||||
*
|
||||
|
|
@ -611,7 +611,7 @@
|
|||
* var oTable;
|
||||
*
|
||||
* // 'open' an information row when a row is clicked on
|
||||
* $('#example tbody tr').click( function () {
|
||||
* $('#example tbody tr').on('click', function () {
|
||||
* if ( oTable.fnIsOpen(this) ) {
|
||||
* oTable.fnClose( this );
|
||||
* } else {
|
||||
|
|
@ -647,7 +647,7 @@
|
|||
* var oTable;
|
||||
*
|
||||
* // 'open' an information row when a row is clicked on
|
||||
* $('#example tbody tr').click( function () {
|
||||
* $('#example tbody tr').on('click', function () {
|
||||
* if ( oTable.fnIsOpen(this) ) {
|
||||
* oTable.fnClose( this );
|
||||
* } else {
|
||||
|
|
@ -976,7 +976,7 @@
|
|||
// If the length menu is given, but the init display length is not, use the length menu
|
||||
if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
|
||||
{
|
||||
oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ?
|
||||
oInit.iDisplayLength = Array.isArray( oInit.aLengthMenu[0] ) ?
|
||||
oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];
|
||||
}
|
||||
|
||||
|
|
@ -1092,7 +1092,7 @@
|
|||
if ( oInit.iDeferLoading !== null )
|
||||
{
|
||||
oSettings.bDeferLoading = true;
|
||||
var tmp = $.isArray( oInit.iDeferLoading );
|
||||
var tmp = Array.isArray( oInit.iDeferLoading );
|
||||
oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
|
||||
oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
|
||||
}
|
||||
|
|
@ -1822,7 +1822,7 @@
|
|||
|
||||
// orderData can be given as an integer
|
||||
var dataSort = init.aDataSort;
|
||||
if ( dataSort && ! $.isArray( dataSort ) ) {
|
||||
if ( dataSort && ! Array.isArray( dataSort ) ) {
|
||||
init.aDataSort = [ dataSort ];
|
||||
}
|
||||
}
|
||||
|
|
@ -2303,7 +2303,7 @@
|
|||
def.targets :
|
||||
def.aTargets;
|
||||
|
||||
if ( ! $.isArray( aTargets ) )
|
||||
if ( ! Array.isArray( aTargets ) )
|
||||
{
|
||||
aTargets = [ aTargets ];
|
||||
}
|
||||
|
|
@ -2622,7 +2622,7 @@
|
|||
innerSrc = a.join('.');
|
||||
|
||||
// Traverse each entry in the array getting the properties requested
|
||||
if ( $.isArray( data ) ) {
|
||||
if ( Array.isArray( data ) ) {
|
||||
for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
|
||||
out.push( fetchData( data[j], type, innerSrc ) );
|
||||
}
|
||||
|
|
@ -2725,7 +2725,7 @@
|
|||
innerSrc = b.join('.');
|
||||
|
||||
// Traverse each entry in the array setting the properties requested
|
||||
if ( $.isArray( val ) )
|
||||
if ( Array.isArray( val ) )
|
||||
{
|
||||
for ( var j=0, jLen=val.length ; j<jLen ; j++ )
|
||||
{
|
||||
|
|
@ -3811,7 +3811,7 @@
|
|||
|
||||
// Convert to object based for 1.10+ if using the old array scheme which can
|
||||
// come from server-side processing or serverParams
|
||||
if ( data && $.isArray(data) ) {
|
||||
if ( data && Array.isArray(data) ) {
|
||||
var tmp = {};
|
||||
var rbracket = /(.*?)\[\]$/;
|
||||
|
||||
|
|
@ -3846,12 +3846,12 @@
|
|||
{
|
||||
ajaxData = ajax.data;
|
||||
|
||||
var newData = $.isFunction( ajaxData ) ?
|
||||
var newData = typeof ajaxData === 'function' ?
|
||||
ajaxData( data, oSettings ) : // fn can manipulate data or return
|
||||
ajaxData; // an object object or array to merge
|
||||
|
||||
// If the function returned something, use that alone
|
||||
data = $.isFunction( ajaxData ) && newData ?
|
||||
data = typeof ajaxData === 'function' && newData ?
|
||||
newData :
|
||||
$.extend( true, data, newData );
|
||||
|
||||
|
|
@ -3915,7 +3915,7 @@
|
|||
url: ajax || oSettings.sAjaxSource
|
||||
} ) );
|
||||
}
|
||||
else if ( $.isFunction( ajax ) )
|
||||
else if ( typeof ajax === 'function' )
|
||||
{
|
||||
// Is a function - let the caller define what needs to be done
|
||||
oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
|
||||
|
|
@ -4787,7 +4787,7 @@
|
|||
classes = settings.oClasses,
|
||||
tableId = settings.sTableId,
|
||||
menu = settings.aLengthMenu,
|
||||
d2 = $.isArray( menu[0] ),
|
||||
d2 = Array.isArray( menu[0] ),
|
||||
lengths = d2 ? menu[0] : menu,
|
||||
language = d2 ? menu[1] : menu;
|
||||
|
||||
|
|
@ -5824,7 +5824,7 @@
|
|||
fixedObj = $.isPlainObject( fixed ),
|
||||
nestedSort = [],
|
||||
add = function ( a ) {
|
||||
if ( a.length && ! $.isArray( a[0] ) ) {
|
||||
if ( a.length && ! Array.isArray( a[0] ) ) {
|
||||
// 1D array
|
||||
nestedSort.push( a );
|
||||
}
|
||||
|
|
@ -5836,7 +5836,7 @@
|
|||
|
||||
// Build the sort array, with pre-fix and post-fix options if they have been
|
||||
// specified
|
||||
if ( $.isArray( fixed ) ) {
|
||||
if ( Array.isArray( fixed ) ) {
|
||||
add( fixed );
|
||||
}
|
||||
|
||||
|
|
@ -6465,9 +6465,9 @@
|
|||
*/
|
||||
function _fnMap( ret, src, name, mappedName )
|
||||
{
|
||||
if ( $.isArray( name ) ) {
|
||||
if ( Array.isArray( name ) ) {
|
||||
$.each( name, function (i, val) {
|
||||
if ( $.isArray( val ) ) {
|
||||
if ( Array.isArray( val ) ) {
|
||||
_fnMap( ret, src, val[0], val[1] );
|
||||
}
|
||||
else {
|
||||
|
|
@ -6519,7 +6519,7 @@
|
|||
}
|
||||
$.extend( true, out[prop], val );
|
||||
}
|
||||
else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) {
|
||||
else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && Array.isArray(val) ) {
|
||||
out[prop] = val.slice();
|
||||
}
|
||||
else {
|
||||
|
|
@ -6863,7 +6863,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
if ( $.isArray( context ) ) {
|
||||
if ( Array.isArray( context ) ) {
|
||||
for ( var i=0, ien=context.length ; i<ien ; i++ ) {
|
||||
ctxSettings( context[i] );
|
||||
}
|
||||
|
|
@ -7217,7 +7217,7 @@
|
|||
|
||||
_Api.register = _api_register = function ( name, val )
|
||||
{
|
||||
if ( $.isArray( name ) ) {
|
||||
if ( Array.isArray( name ) ) {
|
||||
for ( var j=0, jen=name.length ; j<jen ; j++ ) {
|
||||
_Api.register( name[j], val );
|
||||
}
|
||||
|
|
@ -7282,7 +7282,7 @@
|
|||
// New API instance returned, want the value from the first item
|
||||
// in the returned array for the singular result.
|
||||
return ret.length ?
|
||||
$.isArray( ret[0] ) ?
|
||||
Array.isArray( ret[0] ) ?
|
||||
new _Api( ret.context, ret[0] ) : // Array results are 'enhanced'
|
||||
ret[0] :
|
||||
undefined;
|
||||
|
|
@ -8129,7 +8129,7 @@
|
|||
var rows = [];
|
||||
var addRow = function ( r, k ) {
|
||||
// Recursion to allow for arrays of jQuery objects
|
||||
if ( $.isArray( r ) || r instanceof $ ) {
|
||||
if ( Array.isArray( r ) || r instanceof $ ) {
|
||||
for ( var i=0, ien=r.length ; i<ien ; i++ ) {
|
||||
addRow( r[i], k );
|
||||
}
|
||||
|
|
@ -8890,7 +8890,7 @@
|
|||
// Simple column / direction passed in
|
||||
order = [ [ order, dir ] ];
|
||||
}
|
||||
else if ( order.length && ! $.isArray( order[0] ) ) {
|
||||
else if ( order.length && ! Array.isArray( order[0] ) ) {
|
||||
// Arguments passed in (list of 1D arrays)
|
||||
order = Array.prototype.slice.call( arguments );
|
||||
}
|
||||
|
|
@ -8926,7 +8926,7 @@
|
|||
ctx[0].aaSortingFixed :
|
||||
undefined;
|
||||
|
||||
return $.isArray( fixed ) ?
|
||||
return Array.isArray( fixed ) ?
|
||||
{ pre: fixed } :
|
||||
fixed;
|
||||
}
|
||||
|
|
@ -14548,7 +14548,7 @@
|
|||
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
|
||||
button = buttons[i];
|
||||
|
||||
if ( $.isArray( button ) ) {
|
||||
if ( Array.isArray( button ) ) {
|
||||
var inner = $( '<'+(button.DT_el || 'div')+'/>' )
|
||||
.appendTo( container );
|
||||
attach( inner, button );
|
||||
|
|
|
|||
|
|
@ -93,13 +93,12 @@
|
|||
//
|
||||
// > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback );
|
||||
// >
|
||||
// > jQuery('selector').bind( 'someevent', throttled );
|
||||
// > jQuery('selector').unbind( 'someevent', throttled );
|
||||
// > jQuery('selector').on( 'someevent', throttled );
|
||||
// > jQuery('selector').off( 'someevent', throttled );
|
||||
//
|
||||
// This also works in jQuery 1.4+:
|
||||
//
|
||||
// > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) );
|
||||
// > jQuery('selector').unbind( 'someevent', callback );
|
||||
// > jQuery('selector').on( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) );
|
||||
// > jQuery('selector').off( 'someevent', callback );
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
|
|
@ -217,13 +216,12 @@
|
|||
//
|
||||
// > var debounced = jQuery.debounce( delay, [ at_begin, ] callback );
|
||||
// >
|
||||
// > jQuery('selector').bind( 'someevent', debounced );
|
||||
// > jQuery('selector').unbind( 'someevent', debounced );
|
||||
// > jQuery('selector').on( 'someevent', debounced );
|
||||
// > jQuery('selector').off( 'someevent', debounced );
|
||||
//
|
||||
// This also works in jQuery 1.4+:
|
||||
//
|
||||
// > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) );
|
||||
// > jQuery('selector').unbind( 'someevent', callback );
|
||||
// > jQuery('selector').on( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) );
|
||||
// > jQuery('selector').off( 'someevent', callback );
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ function handleSubmit(event, container, options) {
|
|||
function pjax(options) {
|
||||
options = $.extend(true, {}, $.ajaxSettings, pjax.defaults, options)
|
||||
|
||||
if ($.isFunction(options.url)) {
|
||||
if (typeof options.url === 'function') {
|
||||
options.url = options.url()
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ function pjax(options) {
|
|||
// Without adding this secret parameter, some browsers will often
|
||||
// confuse the two.
|
||||
if (!options.data) options.data = {}
|
||||
if ($.isArray(options.data)) {
|
||||
if (Array.isArray(options.data)) {
|
||||
options.data.push({name: '_pjax', value: context.selector})
|
||||
} else {
|
||||
options.data._pjax = context.selector
|
||||
|
|
@ -505,7 +505,7 @@ function onPjaxPopstate(event) {
|
|||
//
|
||||
// Returns nothing since it retriggers a hard form submission.
|
||||
function fallbackPjax(options) {
|
||||
var url = $.isFunction(options.url) ? options.url() : options.url,
|
||||
var url = typeof options.url === 'function' ? options.url() : options.url,
|
||||
method = options.type ? options.type.toUpperCase() : 'GET'
|
||||
|
||||
var form = $('<form>', {
|
||||
|
|
@ -528,7 +528,7 @@ function fallbackPjax(options) {
|
|||
var pair = value.split('=')
|
||||
form.append($('<input>', {type: 'hidden', name: pair[0], value: pair[1]}))
|
||||
})
|
||||
} else if ($.isArray(data)) {
|
||||
} else if (Array.isArray(data)) {
|
||||
$.each(data, function(index, value) {
|
||||
form.append($('<input>', {type: 'hidden', name: value.name, value: value.value}))
|
||||
})
|
||||
|
|
@ -539,7 +539,7 @@ function fallbackPjax(options) {
|
|||
}
|
||||
|
||||
$(document.body).append(form)
|
||||
form.submit()
|
||||
form.trigger('submit')
|
||||
}
|
||||
|
||||
// Internal: Abort an XmlHttpRequest if it hasn't been completed,
|
||||
|
|
@ -910,9 +910,9 @@ function disable() {
|
|||
|
||||
|
||||
// Add the state property to jQuery's event object so we can use it in
|
||||
// $(window).bind('popstate')
|
||||
if ( $.inArray('state', $.event.props) < 0 )
|
||||
$.event.props.push('state')
|
||||
// $(window).on('popstate')
|
||||
if ( $.event && $.event.addProp )
|
||||
$.event.addProp('state')
|
||||
|
||||
// Is pjax supported by this browser?
|
||||
$.support.pjax =
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@
|
|||
}, _data.latency);
|
||||
};
|
||||
|
||||
$(this).bind('scroll', handler).data(uid1, handler);
|
||||
$(this).on('scroll', handler).data(uid1, handler);
|
||||
},
|
||||
teardown: function() {
|
||||
$(this).unbind('scroll', $(this).data(uid1));
|
||||
$(this).off('scroll', $(this).data(uid1));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -82,10 +82,10 @@
|
|||
}, _data.latency);
|
||||
};
|
||||
|
||||
$(this).bind('scroll', handler).data(uid2, handler);
|
||||
$(this).on('scroll', handler).data(uid2, handler);
|
||||
},
|
||||
teardown: function() {
|
||||
$(this).unbind('scroll', $(this).data(uid2));
|
||||
$(this).off('scroll', $(this).data(uid2));
|
||||
}
|
||||
};
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -3,25 +3,41 @@ var AgeModule = (function () {
|
|||
return {
|
||||
age: function(prevdate, now, show_short_version, show_suffix, short_format) {
|
||||
|
||||
var prevdate = moment(prevdate).utc();
|
||||
var now = now ? moment(now).utc() : moment().utc();
|
||||
prevdate = luxon.DateTime.fromJSDate(prevdate, { zone: "utc" });
|
||||
now = now
|
||||
? luxon.DateTime.fromJSDate(now, { zone: "utc" })
|
||||
: luxon.DateTime.utc();
|
||||
|
||||
var show_short_version = show_short_version || false;
|
||||
var show_suffix = show_suffix || true;
|
||||
var short_format = short_format || false;
|
||||
|
||||
var _get_relative_delta = function(now, prevdate) {
|
||||
const duration = now.diff(prevdate, [
|
||||
"years",
|
||||
"months",
|
||||
"days",
|
||||
"hours",
|
||||
"minutes",
|
||||
"seconds",
|
||||
]);
|
||||
const {
|
||||
years = 0,
|
||||
months = 0,
|
||||
days = 0,
|
||||
hours = 0,
|
||||
minutes = 0,
|
||||
seconds = 0,
|
||||
} = duration.toObject();
|
||||
|
||||
var duration = moment.duration(moment(now).diff(prevdate));
|
||||
return {
|
||||
'year': duration.years(),
|
||||
'month': duration.months(),
|
||||
'day': duration.days(),
|
||||
'hour': duration.hours(),
|
||||
'minute': duration.minutes(),
|
||||
'second': duration.seconds()
|
||||
};
|
||||
|
||||
return {
|
||||
year: years,
|
||||
month: months,
|
||||
day: days,
|
||||
hour: hours,
|
||||
minute: minutes,
|
||||
second: seconds,
|
||||
};
|
||||
};
|
||||
|
||||
var _is_leap_year = function(year){
|
||||
|
|
@ -29,11 +45,12 @@ var AgeModule = (function () {
|
|||
};
|
||||
|
||||
var get_month = function(prevdate) {
|
||||
return prevdate.getMonth()
|
||||
// mimic moment().month() // 0–11
|
||||
return prevdate.month - 1;
|
||||
};
|
||||
|
||||
var get_year = function(prevdate) {
|
||||
return prevdate.getYear()
|
||||
return prevdate.year;
|
||||
};
|
||||
|
||||
var order = ['year', 'month', 'day', 'hour', 'minute', 'second'];
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
var years = days / 365;
|
||||
|
||||
function substitute(stringOrFunction, number) {
|
||||
var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
|
||||
var string = typeof stringOrFunction === 'function' ? stringOrFunction(number, distanceMillis) : stringOrFunction;
|
||||
var value = ($l.numbers && $l.numbers[number]) || number;
|
||||
return string.replace(/%d/i, value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ if (typeof console == "undefined" || typeof console.log == "undefined"){
|
|||
* show more
|
||||
*/
|
||||
var show_more_event = function(){
|
||||
$('table .show_more').click(function(e) {
|
||||
$('table .show_more').on('click', function(e) {
|
||||
var cid = e.target.id.substring(1);
|
||||
var button = $(this);
|
||||
if (button.hasClass('open')) {
|
||||
|
|
@ -65,7 +65,7 @@ var compare_radio_buttons = function(repo_name, compare_ref_type){
|
|||
var source = $('input[name=compare_source]:checked').val();
|
||||
var target = $('input[name=compare_target]:checked').val();
|
||||
if(source && target){
|
||||
$('#compare_action').removeAttr("disabled");
|
||||
$('#compare_action').prop('disabled', false);
|
||||
$('#compare_action').removeClass("disabled");
|
||||
}
|
||||
})
|
||||
|
|
@ -188,8 +188,8 @@ function collapsableContent() {
|
|||
|
||||
$('.collapsable-content').not('.no-hide').hide();
|
||||
|
||||
$('.btn-collapse').unbind(); //in case we've been here before
|
||||
$('.btn-collapse').click(function() {
|
||||
$('.btn-collapse').off(); //in case we've been here before
|
||||
$('.btn-collapse').on('click', function() {
|
||||
var button = $(this);
|
||||
var togglename = $(this).data("toggle");
|
||||
$('.collapsable-content[data-toggle='+togglename+']').toggle();
|
||||
|
|
@ -503,7 +503,7 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
$('#expand_all_files').click(function() {
|
||||
$('#expand_all_files').on('click', function() {
|
||||
$('.expand_file').each(function() {
|
||||
var node = $(this);
|
||||
var icon = $($(node.children().first()).children().first());
|
||||
|
|
@ -521,7 +521,7 @@ $(document).ready(function() {
|
|||
});
|
||||
});
|
||||
|
||||
$('#collapse_all_files').click(function() {
|
||||
$('#collapse_all_files').on('click', function() {
|
||||
$('.collapse_file').each(function() {
|
||||
var node = $(this);
|
||||
var icon = $($(node.children().first()).children().first());
|
||||
|
|
@ -652,22 +652,22 @@ var feedLifetimeOptions = function(query, initialData){
|
|||
|
||||
if (isQuery) {
|
||||
|
||||
var now = moment.utc();
|
||||
const now = luxon.DateTime.utc();
|
||||
|
||||
var parseQuery = function(entry, now){
|
||||
var fmt = 'DD/MM/YYYY H:mm';
|
||||
var parsed = moment.utc(entry, fmt);
|
||||
var diffInMin = parsed.diff(now, 'minutes');
|
||||
var fmt = 'dd/LL/yyyy H:mm';
|
||||
var parsed = luxon.DateTime.fromFormat(entry, fmt, { zone: "utc" });
|
||||
var diffInMin = parsed.diff(now, "minutes").as("minutes");
|
||||
|
||||
if (diffInMin > 0){
|
||||
return {
|
||||
id: diffInMin,
|
||||
text: parsed.format(fmt)
|
||||
text: parsed.toFormat(fmt),
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
id: undefined,
|
||||
text: parsed.format('DD/MM/YYYY') + ' ' + _gettext('date not in future')
|
||||
text: parsed.toFormat('DD/MM/YYYY') + ' ' + _gettext('date not in future')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -349,12 +349,12 @@ var initCommentBoxCodeMirror = function(CommentForm, textAreaId, triggerActions)
|
|||
};
|
||||
|
||||
var submitForm = function(cm, pred) {
|
||||
$(cm.display.input.textarea.form).find('.submit-comment-action').click();
|
||||
$(cm.display.input.textarea.form).find('.submit-comment-action').trigger('click');
|
||||
return CodeMirror.Pass;
|
||||
};
|
||||
|
||||
var submitFormAsDraft = function(cm, pred) {
|
||||
$(cm.display.input.textarea.form).find('.submit-draft-action').click();
|
||||
$(cm.display.input.textarea.form).find('.submit-draft-action').trigger('click');
|
||||
return CodeMirror.Pass;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ var _submitAjaxPOST = function(url, postData, successHandler, failHandler) {
|
|||
$(self.editButton).parent().removeClass('active');
|
||||
});
|
||||
|
||||
$(this.submitForm).submit(function(e) {
|
||||
$(this.submitForm).on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
var allowedToSubmit = self.isAllowedToSubmit();
|
||||
if (!allowedToSubmit){
|
||||
|
|
@ -551,7 +551,7 @@ var initVersionSelector = function(selector, initialData) {
|
|||
|
||||
$(selector).on('select2-selecting', function (e) {
|
||||
// hide the mast as we later do preventDefault()
|
||||
$("#select2-drop-mask").click();
|
||||
$("#select2-drop-mask").trigger('click');
|
||||
e.preventDefault();
|
||||
e.choice.action();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ var checkFileHead = function($editForm, commit_id, f_path, operation) {
|
|||
|
||||
$editForm.find('#commit_btn').data('validHead', true);
|
||||
$editForm.find('#commit_btn').val('Committing...');
|
||||
$editForm.submit();
|
||||
$editForm.trigger('submit');
|
||||
|
||||
} else {
|
||||
var message = '';
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ var quick_repo_menu = function() {
|
|||
$('.menu_items_container').hide();
|
||||
$('.active_quick_repo').removeClass('active_quick_repo');
|
||||
};
|
||||
$('.quick_repo_menu').hover(function() {
|
||||
$('.quick_repo_menu').on('mouseenter', function() {
|
||||
hide_quick_repo_menus();
|
||||
if (!$(this).hasClass('active_quick_repo')) {
|
||||
$('.menu_items_container', this).removeClass("hidden").show();
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ var prButtonLock = function(lockEnabled, msg, scope) {
|
|||
$('#pr_submit').attr('disabled', 'disabled');
|
||||
}
|
||||
else if (checksMeet) {
|
||||
$('#pr_submit').removeAttr('disabled');
|
||||
$('#pr_submit').prop('disabled', false);
|
||||
}
|
||||
|
||||
if (msg) {
|
||||
|
|
@ -653,10 +653,10 @@ window.VersionController = function () {
|
|||
|
||||
|
||||
this.attachVersionListener = function () {
|
||||
self.$verTarget.change(function (e) {
|
||||
self.$verTarget.on('change', function (e) {
|
||||
self.adjustRadioSelectors(this)
|
||||
});
|
||||
self.$verSource.change(function (e) {
|
||||
self.$verSource.on('change', function (e) {
|
||||
self.adjustRadioSelectors(self.$verTarget.filter(':checked'))
|
||||
});
|
||||
};
|
||||
|
|
@ -679,7 +679,7 @@ window.VersionController = function () {
|
|||
$showVersionDiff.html($showVersionDiff.data('labelTextLocked'));
|
||||
}
|
||||
else {
|
||||
$showVersionDiff.removeAttr('disabled');
|
||||
$showVersionDiff.prop('disabled', false);
|
||||
$showVersionDiff.removeClass('disabled');
|
||||
|
||||
if (selectedVersion == otherVersion) {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ function submitConfirm(event, self, question, confirmText, htmlText) {
|
|||
confirmButtonText: confirmText
|
||||
}).then(function(result) {
|
||||
if (result.value) {
|
||||
$(self).closest("form").submit();
|
||||
$(self).closest("form").trigger('submit');
|
||||
}
|
||||
})
|
||||
}
|
||||
50
rhodecode/public/js/src/select2/select2.js
vendored
50
rhodecode/public/js/src/select2/select2.js
vendored
|
|
@ -428,7 +428,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
if (handler && typeof handler.abort === "function") { handler.abort(); }
|
||||
|
||||
if (options.params) {
|
||||
if ($.isFunction(options.params)) {
|
||||
if (typeof options.params === 'function') {
|
||||
$.extend(params, options.params.call(self));
|
||||
} else {
|
||||
$.extend(params, options.params);
|
||||
|
|
@ -481,12 +481,12 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
tmp,
|
||||
text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
|
||||
|
||||
if ($.isArray(data)) {
|
||||
if (Array.isArray(data)) {
|
||||
tmp = data;
|
||||
data = { results: tmp };
|
||||
}
|
||||
|
||||
if ($.isFunction(data) === false) {
|
||||
if (typeof data !== 'function') {
|
||||
tmp = data;
|
||||
data = function() { return tmp; };
|
||||
}
|
||||
|
|
@ -495,7 +495,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
if (dataItem.text) {
|
||||
text = dataItem.text;
|
||||
// if text is not a function we assume it to be a key name
|
||||
if (!$.isFunction(text)) {
|
||||
if (typeof data !== 'function') {
|
||||
dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
|
||||
text = function (item) { return item[dataText]; };
|
||||
}
|
||||
|
|
@ -535,11 +535,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
|
||||
// TODO javadoc
|
||||
function tags(data) {
|
||||
var isFunc = $.isFunction(data);
|
||||
var isFunc = typeof data === 'function';
|
||||
return function (query) {
|
||||
var t = query.term, filtered = {results: []};
|
||||
var result = isFunc ? data(query) : data;
|
||||
if ($.isArray(result)) {
|
||||
if (Array.isArray(result)) {
|
||||
$(result).each(function () {
|
||||
var isObject = this.text !== undefined,
|
||||
text = isObject ? this.text : this;
|
||||
|
|
@ -561,7 +561,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
* @param formatter
|
||||
*/
|
||||
function checkFormatter(formatter, formatterName) {
|
||||
if ($.isFunction(formatter)) return true;
|
||||
if (typeof formatter === 'function') return true;
|
||||
if (!formatter) return false;
|
||||
if (typeof(formatter) === 'string') return true;
|
||||
throw new Error(formatterName +" must be a string, function, or falsy value");
|
||||
|
|
@ -576,7 +576,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
* @returns {*}
|
||||
*/
|
||||
function evaluate(val, context) {
|
||||
if ($.isFunction(val)) {
|
||||
if (typeof val === 'function') {
|
||||
var args = Array.prototype.slice.call(arguments, 2);
|
||||
return val.apply(context, args);
|
||||
}
|
||||
|
|
@ -816,7 +816,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
|
||||
this.lastSearchTerm = undefined;
|
||||
|
||||
if ($.isFunction(this.opts.initSelection)) {
|
||||
if (typeof this.opts.initSelection === 'function') {
|
||||
// initialize selection based on the current value of the source element
|
||||
this.initSelection();
|
||||
|
||||
|
|
@ -1026,7 +1026,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
var elemTags = opts.element.data('tags');
|
||||
|
||||
// data-tags should actually be a boolean
|
||||
if (!$.isArray(elemTags)) {
|
||||
if (!Array.isArray(elemTags)) {
|
||||
elemTags = [];
|
||||
}
|
||||
|
||||
|
|
@ -1045,7 +1045,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
|
||||
// ajax.results -> ajax.processResults
|
||||
if (opts.ajax != null) {
|
||||
if ($.isFunction(opts.ajax.processResults)) {
|
||||
if (typeof opts.ajax.processResults === 'function') {
|
||||
opts.ajax.results = opts.ajax.processResults;
|
||||
}
|
||||
}
|
||||
|
|
@ -1055,32 +1055,32 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
var lang = opts.language;
|
||||
|
||||
// formatNoMatches -> language.noMatches
|
||||
if ($.isFunction(lang.noMatches)) {
|
||||
if (typeof lang.noMatches === 'function') {
|
||||
opts.formatNoMatches = lang.noMatches;
|
||||
}
|
||||
|
||||
// formatSearching -> language.searching
|
||||
if ($.isFunction(lang.searching)) {
|
||||
if (typeof lang.searching === 'function') {
|
||||
opts.formatSearching = lang.searching;
|
||||
}
|
||||
|
||||
// formatInputTooShort -> language.inputTooShort
|
||||
if ($.isFunction(lang.inputTooShort)) {
|
||||
if (typeof lang.inputTooShort === 'function') {
|
||||
opts.formatInputTooShort = lang.inputTooShort;
|
||||
}
|
||||
|
||||
// formatInputTooLong -> language.inputTooLong
|
||||
if ($.isFunction(lang.inputTooLong)) {
|
||||
if (typeof lang.inputTooLong === 'function') {
|
||||
opts.formatInputTooLong = lang.inputTooLong;
|
||||
}
|
||||
|
||||
// formatLoading -> language.loadingMore
|
||||
if ($.isFunction(lang.loadingMore)) {
|
||||
if (typeof lang.loadingMore === 'function') {
|
||||
opts.formatLoading = lang.loadingMore;
|
||||
}
|
||||
|
||||
// formatSelectionTooBig -> language.maximumSelected
|
||||
if ($.isFunction(lang.maximumSelected)) {
|
||||
if (typeof lang.maximumSelected === 'function') {
|
||||
opts.formatSelectionTooBig = lang.maximumSelected;
|
||||
}
|
||||
}
|
||||
|
|
@ -1152,7 +1152,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
opts.id = function (e) { return e[idKey]; };
|
||||
}
|
||||
|
||||
if ($.isArray(opts.element.data("select2Tags"))) {
|
||||
if (Array.isArray(opts.element.data("select2Tags"))) {
|
||||
if ("tags" in opts) {
|
||||
throw "tags specified as both an attribute 'data-select2-tags' and in options of Select2 " + opts.element.attr("id");
|
||||
}
|
||||
|
|
@ -1217,7 +1217,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
$(splitVal(element.val(), opts.separator, opts.transformVal)).each(function () {
|
||||
var obj = { id: this, text: this },
|
||||
tags = opts.tags;
|
||||
if ($.isFunction(tags)) tags=tags();
|
||||
if (typeof tags === 'function') tags=tags();
|
||||
$(tags).each(function() { if (equal(this.id, obj.id)) { obj = this; return false; } });
|
||||
data.push(obj);
|
||||
});
|
||||
|
|
@ -1321,7 +1321,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
|
||||
// some validation frameworks ignore the change event and listen instead to keyup, click for selects
|
||||
// so here we trigger the click event manually
|
||||
this.opts.element.click();
|
||||
this.opts.element.trigger('click');
|
||||
|
||||
// ValidationEngine ignores the change event and listens instead to blur
|
||||
// so here we trigger the blur event manually if so desired
|
||||
|
|
@ -1904,7 +1904,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
var maxSelSize = this.getMaximumSelectionSize();
|
||||
if (maxSelSize >=1) {
|
||||
data = this.data();
|
||||
if ($.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
|
||||
if (Array.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
|
||||
render("<li class='select2-selection-limit'>" + evaluate(opts.formatSelectionTooBig, opts.element, maxSelSize) + "</li>");
|
||||
return;
|
||||
}
|
||||
|
|
@ -2116,7 +2116,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
}
|
||||
|
||||
return null;
|
||||
} else if ($.isFunction(this.opts.width)) {
|
||||
} else if (typeof this.opts.width === 'function') {
|
||||
return this.opts.width();
|
||||
} else {
|
||||
return this.opts.width;
|
||||
|
|
@ -2530,7 +2530,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
}
|
||||
return is_match;
|
||||
},
|
||||
callback: !$.isFunction(callback) ? $.noop : function() {
|
||||
callback: typeof callback !== 'function' ? $.noop : function() {
|
||||
callback(match);
|
||||
}
|
||||
});
|
||||
|
|
@ -2822,7 +2822,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
}
|
||||
return is_match;
|
||||
},
|
||||
callback: !$.isFunction(callback) ? $.noop : function() {
|
||||
callback: typeof callback !== 'function' ? $.noop : function() {
|
||||
// reorder matches based on the order they appear in the ids array because right now
|
||||
// they are in the order in which they appear in data array
|
||||
var ordered = [];
|
||||
|
|
@ -3642,7 +3642,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||
id: function (e) { return e == undefined ? null : e.id; },
|
||||
text: function (e) {
|
||||
if (e && this.data && this.data.text) {
|
||||
if ($.isFunction(this.data.text)) {
|
||||
if (typeof this.data.text === 'function') {
|
||||
return this.data.text(e);
|
||||
} else {
|
||||
return e[this.data.text];
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$('.toggle-plugin').click(function(e){
|
||||
$('.toggle-plugin').on('click', function(e){
|
||||
var auth_plugins_input = $('#auth_plugins');
|
||||
var elems = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
if(detected_mode){
|
||||
$(modes_select).select2("val", mimetype);
|
||||
$(modes_select).change();
|
||||
$(modes_select).trigger('change');
|
||||
setCodeMirrorMode(myCodeMirror, detected_mode);
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
$.Topic('/notifications').publish(alertMessage[0]);
|
||||
}
|
||||
else{
|
||||
$('#eform').submit();
|
||||
$('#eform').trigger('submit');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -108,6 +108,6 @@
|
|||
});
|
||||
|
||||
$('.reset-inheritance').on('click', function(e){
|
||||
$('#inherit_global_issuetracker').prop('checked', false).change();
|
||||
$('#inherit_global_issuetracker').prop('checked', false).trigger('change');
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ executeTask = function() {
|
|||
|
||||
$(displayHtml).append(data);
|
||||
$('#results').html(displayHtml);
|
||||
btn.removeAttr('disabled');
|
||||
btn.prop('disabled', false);
|
||||
btn.removeClass('disabled');
|
||||
};
|
||||
ajaxGET(url, success, null);
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ checkCommits = function() {
|
|||
};
|
||||
|
||||
btn.html('Strip');
|
||||
btn.removeAttr('disabled');
|
||||
btn.prop('disabled', false);
|
||||
btn.removeClass('disabled');
|
||||
btn.attr('onclick','strip();return false;');
|
||||
ajaxPOST(url, postData, success, null);
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ import json
|
|||
setAIFieldsActive(this.checked);
|
||||
});
|
||||
|
||||
$updateModelsBtn.click(function () {
|
||||
$updateModelsBtn.on('click', function () {
|
||||
const $apiKey = $('#rhodecode_ai_api_key input');
|
||||
|
||||
if (!$apiKey.val()) {
|
||||
|
|
@ -211,7 +211,7 @@ import json
|
|||
|
||||
});
|
||||
|
||||
$form.submit(function () {
|
||||
$form.on('submit', function () {
|
||||
let $f = $(this);
|
||||
|
||||
let $tmpEnabled = $f.find(':disabled');
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$('#check_for_update').click(function(e){
|
||||
$('#check_for_update').on('click', function(e){
|
||||
$('#update_notice').show();
|
||||
$('#update_notice').load("${h.route_path('admin_settings_system_update', _query={'ver': request.GET.get('ver')})}");
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1195,7 +1195,7 @@
|
|||
"use sctrict";
|
||||
|
||||
// details block auto-hide menu
|
||||
$(document).mouseup(function(e) {
|
||||
$(document).on('mouseup', function(e) {
|
||||
var container = $('.details-inline-block');
|
||||
if (!container.is(e.target) && container.has(e.target).length === 0) {
|
||||
$('.details-inline-block[open]').removeAttr('open')
|
||||
|
|
|
|||
|
|
@ -1170,7 +1170,7 @@ def get_comments_for(diff_type, comments, filename, line_version, line_number):
|
|||
// expand the container if we quick-select the field
|
||||
$('#'+idSelector).next().prop('checked', false);
|
||||
// hide the mast as we later do preventDefault()
|
||||
$("#select2-drop-mask").click();
|
||||
$("#select2-drop-mask").trigger('click');
|
||||
|
||||
window.location.hash = '#'+idSelector;
|
||||
updateSticky();
|
||||
|
|
|
|||
|
|
@ -1135,12 +1135,12 @@ $(document).ready(function () {
|
|||
$('#selected_mode').html(detected_mode);
|
||||
}
|
||||
|
||||
$('#ignorews').change(function(e){
|
||||
$('#ignorews').on('change', function(e){
|
||||
var val = e.currentTarget.checked;
|
||||
$('#compare').mergely('options', {ignorews: val});
|
||||
$('#compare').mergely('update');
|
||||
});
|
||||
$('#edit_mode').change(function(e){
|
||||
$('#edit_mode').on('change', function(e){
|
||||
var val = !e.currentTarget.checked;
|
||||
$('#compare').mergely('cm', 'lhs').setOption('readOnly', val);
|
||||
$('#compare').mergely('cm', 'rhs').setOption('readOnly', val);
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ $(document).ready(function() {
|
|||
elem.html(elem.html() + ' ' + total );
|
||||
});
|
||||
|
||||
$('#merge_pull_request_form').submit(function() {
|
||||
$('#merge_pull_request_form').on('submit', function() {
|
||||
if (!$('#merge_pull_request').attr('disabled')) {
|
||||
$('#merge_pull_request').attr('disabled', 'disabled');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
var state = getFileState();
|
||||
|
||||
// select code link event
|
||||
$("#hlcode").mouseup(getSelectionLink);
|
||||
$("#hlcode").on('mouseup', getSelectionLink);
|
||||
|
||||
// file history select2 used for history of file, and switch to
|
||||
var initialCommitData = {
|
||||
|
|
|
|||
|
|
@ -131,15 +131,15 @@
|
|||
|
||||
|
||||
<script>
|
||||
$('#squash_merge_pull_request').click(function (e) {
|
||||
$('#squash_merge_pull_request').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#squash_merge_pull_request_value').val("true");
|
||||
|
||||
$('#merge_pull_request_form').submit();
|
||||
$('#merge_pull_request_form').trigger('submit');
|
||||
});
|
||||
|
||||
$('#merge_pull_request_form').submit(function () {
|
||||
$('#merge_pull_request_form').on('submit', function () {
|
||||
if (!$('#merge_pull_request').attr('disabled')) {
|
||||
$('#merge_pull_request').attr('disabled', 'disabled');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -978,7 +978,7 @@ window.setObserversData = ${c.pull_request_set_observers_data_json | n};
|
|||
// inject closing flag
|
||||
$('.action-buttons-extra').append('<input type="hidden" class="close-pr-input" id="close_pull_request" value="1">');
|
||||
$(generalCommentForm.statusChange).select2("val", status).trigger('change');
|
||||
$(generalCommentForm.submitForm).submit();
|
||||
$(generalCommentForm.submitForm).trigger('submit');
|
||||
};
|
||||
|
||||
//TODO this functionality is now missing
|
||||
|
|
@ -995,7 +995,7 @@ window.setObserversData = ${c.pull_request_set_observers_data_json | n};
|
|||
}
|
||||
});
|
||||
|
||||
$('#merge_pull_request_form').submit(function () {
|
||||
$('#merge_pull_request_form').on('submit', function () {
|
||||
if (!$('#merge_pull_request').attr('disabled')) {
|
||||
$('#merge_pull_request').attr('disabled', 'disabled');
|
||||
}
|
||||
|
|
@ -1038,7 +1038,7 @@ window.setObserversData = ${c.pull_request_set_observers_data_json | n};
|
|||
});
|
||||
|
||||
// fixing issue with caches on firefox
|
||||
$('#update_commits').removeAttr("disabled");
|
||||
$('#update_commits').prop('disabled', false);
|
||||
|
||||
$('.show-inline-comments').on('click', function (e) {
|
||||
var boxid = $(this).attr('data-comment-id');
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ index a934a3360ef6bdf340a036e6f3475daa7a54103c..00000000000000000000000000000000
|
|||
-
|
||||
-/*
|
||||
- // Toggle Calendars
|
||||
- $('div#sidebar ul li a').click(function() {
|
||||
- $('div#sidebar ul li a').on('click', function() {
|
||||
- if ($(this).is('#toggleMonthView')) {
|
||||
- console.log('toggle month');
|
||||
- $(this).addClass('active');
|
||||
|
|
@ -297,8 +297,8 @@ index 0000000000000000000000000000000000000000..db7af7989499dd359737a880828f8d1b
|
|||
+ }
|
||||
+
|
||||
+ // Keyboard controls
|
||||
+ $(document).bind('keydown', keydownHandler);
|
||||
+ $(document).bind('keyup', keyupHandler);
|
||||
+ $(document).on('keydown', keydownHandler);
|
||||
+ $(document).on('keyup', keyupHandler);
|
||||
+
|
||||
+ /**
|
||||
+ * Helpers
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ deleted file mode 100644
|
|||
-
|
||||
-/*
|
||||
- // Toggle Calendars
|
||||
- $('div#sidebar ul li a').click(function() {
|
||||
- $('div#sidebar ul li a').on('click', function() {
|
||||
- if ($(this).is('#toggleMonthView')) {
|
||||
- console.log('toggle month');
|
||||
- $(this).addClass('active');
|
||||
|
|
@ -286,8 +286,8 @@ new file mode 100755
|
|||
+ }
|
||||
+
|
||||
+ // Keyboard controls
|
||||
+ $(document).bind('keydown', keydownHandler);
|
||||
+ $(document).bind('keyup', keyupHandler);
|
||||
+ $(document).on('keydown', keydownHandler);
|
||||
+ $(document).on('keyup', keyupHandler);
|
||||
+
|
||||
+ /**
|
||||
+ * Helpers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue