JS fixes and typo
This commit is contained in:
parent
50d3ffb035
commit
98315b0f72
|
|
@ -116,7 +116,7 @@
|
|||
if (!data)
|
||||
$this.data('oc.barChart', new BarChart(this, options))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.barChart.Constructor = BarChart
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
|
||||
this.chartOptions = $.extend({}, this.chartOptions, parsedOptions)
|
||||
|
||||
this.options = options,
|
||||
this.options = options
|
||||
this.$el = $(element)
|
||||
this.fullDataSet = []
|
||||
this.resetZoomLink = $(options.resetZoomLink)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
else
|
||||
data.update(option)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.goalMeter.Constructor = GoalMeter
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
*
|
||||
* Dependences:
|
||||
* - Raphaël (raphael-min.js)
|
||||
* - October chart utilities (october.chartutils.js)
|
||||
* - October chart utilities (chart.utils.js)
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
if (!data)
|
||||
$this.data('oc.pieChart', new PieChart(this, options))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.pieChart.Constructor = PieChart
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
*/
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
var ChartUtils = function() {}
|
||||
|
||||
ChartUtils.prototype.defaultValueColor = '#b8b8b8';
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
if (!data) $this.data('oc.balloon-selector', (data = new BalloonSelector(this, options)))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.balloonSelector.Constructor = BalloonSelector
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
(function($){
|
||||
(function($) {
|
||||
|
||||
$(document).on('keydown', 'div.custom-checkbox', function(e){
|
||||
$(document).on('keydown', 'div.custom-checkbox', function(e) {
|
||||
if (e.keyCode == 32)
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
$(document).on('keyup', 'div.custom-checkbox', function(e){
|
||||
$(document).on('keyup', 'div.custom-checkbox', function(e) {
|
||||
if (e.keyCode == 32) {
|
||||
var $cb = $('input', this)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
*/
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
var Base = $.oc.foundation.base,
|
||||
BaseProto = Base.prototype
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@
|
|||
data[option].apply(data, methodArgs)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.dragScroll.Constructor = DragScroll
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
var Base = $.oc.foundation.base,
|
||||
BaseProto = Base.prototype
|
||||
|
||||
|
|
@ -204,7 +205,7 @@
|
|||
if (!data) $this.data('oc.sortable', (data = new Sortable(this, options)))
|
||||
if (typeof option == 'string') data[option].apply(data, args)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.sortable.Constructor = Sortable
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
// IE
|
||||
if (document.selection) {
|
||||
el.focus()
|
||||
sel = document.selection.createRange()
|
||||
var sel = document.selection.createRange()
|
||||
sel.text = insertValue
|
||||
el.focus()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
var FilterWidget = function (element, options) {
|
||||
|
||||
var $el = this.$el = $(element);
|
||||
this.$el = $(element);
|
||||
|
||||
this.options = options || {}
|
||||
this.scopeValues = {}
|
||||
|
|
@ -427,7 +427,7 @@
|
|||
})
|
||||
|
||||
return result ? result : this
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.filterWidget.Constructor = FilterWidget
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
$(document.body).append($element)
|
||||
|
||||
setTimeout(function(){
|
||||
setTimeout(function() {
|
||||
$element.addClass('in')
|
||||
}, 1)
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@
|
|||
this.proxiedMethods = {}
|
||||
}
|
||||
|
||||
Base.prototype.dispose = function()
|
||||
{
|
||||
Base.prototype.dispose = function() {
|
||||
for (var key in this.proxiedMethods) {
|
||||
this.proxiedMethods[key] = null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
$.oc.foundation.controlUtils = ControlUtils;
|
||||
|
||||
$(document).on('ajaxBeforeReplace', function(ev){
|
||||
// Automatically displose controls in an element
|
||||
// Automatically dispose controls in an element
|
||||
// before the element contents is replaced.
|
||||
// The ajaxBeforeReplace event is triggered in
|
||||
// framework.js
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@
|
|||
if (!data) $this.data('oc.hotkey', (data = new HotKey(this, options)))
|
||||
if (typeof option == 'string') data[option].apply(data, args)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.hotKey.Constructor = HotKey
|
||||
|
||||
|
|
@ -210,7 +210,7 @@
|
|||
// HOTKEY DATA-API
|
||||
// ==============
|
||||
|
||||
$(document).render(function(){
|
||||
$(document).render(function() {
|
||||
$('[data-hotkey]').hotKey()
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
BaseProto = Base.prototype
|
||||
|
||||
var ChangeMonitor = function (element, options) {
|
||||
var $el = this.$el = $(element);
|
||||
this.$el = $(element);
|
||||
|
||||
this.paused = false
|
||||
this.options = options || {}
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
|
||||
if (!data) $this.data('oc.changeMonitor', (data = new ChangeMonitor(this, options)))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.changeMonitor.Constructor = ChangeMonitor
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,8 @@
|
|||
// INPUT CONVERTER DATA-API
|
||||
// ===============
|
||||
|
||||
$(document).render(function(){
|
||||
$(document).render(function() {
|
||||
$('[data-input-preset]').inputPreset()
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
|
||||
if (!data) $this.data('oc.triggerOn', (data = new TriggerOn(this, options)))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.triggerOn.Constructor = TriggerOn
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
*/
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
var Base = $.oc.foundation.base,
|
||||
BaseProto = Base.prototype,
|
||||
listSortableIdCounter = 0,
|
||||
|
|
@ -94,6 +95,8 @@
|
|||
}
|
||||
|
||||
ListSortable.prototype.unregisterListHandlers = function(list) {
|
||||
var $list = $(list)
|
||||
|
||||
$list.off('dragstart', '> li', this.proxy(this.onDragStart))
|
||||
$list.off('dragover', '> li', this.proxy(this.onDragOver))
|
||||
$list.off('dragenter', '> li', this.proxy(this.onDragEnter))
|
||||
|
|
@ -138,7 +141,7 @@
|
|||
ListSortable.prototype.elementBelongsToManagedList = function(element) {
|
||||
for (var i=this.lists.length-1; i >= 0; i--) {
|
||||
var list = this.lists[i],
|
||||
children = [].slice.call(list.children) // Converts HTMLCollection to array
|
||||
children = [].slice.call(list.children); // Converts HTMLCollection to array
|
||||
|
||||
if (children.indexOf(element) !== -1) {
|
||||
return true
|
||||
|
|
@ -442,7 +445,7 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.listSortable.Constructor = ListSortable
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
var LoadIndicator = function (element, options) {
|
||||
|
||||
var $el = this.$el = $(element)
|
||||
this.$el = $(element)
|
||||
|
||||
this.options = options || {}
|
||||
this.tally = 0
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.loadIndicator.Constructor = LoadIndicator
|
||||
|
||||
|
|
|
|||
|
|
@ -39,9 +39,7 @@
|
|||
if (this.counter > 1)
|
||||
return
|
||||
|
||||
var self = this,
|
||||
$window = $(window);
|
||||
|
||||
var self = this;
|
||||
|
||||
if (event !== undefined && event.clientY !== undefined) {
|
||||
self.indicator.css({
|
||||
|
|
@ -73,7 +71,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function() {
|
||||
$.oc.cursorLoadIndicator = new CursorLoadIndicator();
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@
|
|||
data[option].apply(data, methodArgs)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.ocPopover.Constructor = Popover
|
||||
|
||||
|
|
|
|||
|
|
@ -2534,8 +2534,7 @@ if($.oc.foundation===undefined)
|
|||
$.oc.foundation={}
|
||||
$.oc.foundation._proxyCounter=0
|
||||
var Base=function(){this.proxiedMethods={}}
|
||||
Base.prototype.dispose=function()
|
||||
{for(var key in this.proxiedMethods){this.proxiedMethods[key]=null}
|
||||
Base.prototype.dispose=function(){for(var key in this.proxiedMethods){this.proxiedMethods[key]=null}
|
||||
this.proxiedMethods=null}
|
||||
Base.prototype.proxy=function(method){if(method.ocProxyId===undefined){$.oc.foundation._proxyCounter++
|
||||
method.ocProxyId=$.oc.foundation._proxyCounter}
|
||||
|
|
@ -2868,7 +2867,7 @@ if(typeof option=='string')data[option].apply(data,args)})}
|
|||
$.fn.toolbar.Constructor=Toolbar
|
||||
$.fn.toolbar.noConflict=function(){$.fn.toolbar=old
|
||||
return this}
|
||||
$(document).on('render',function(){$('[data-control=toolbar]').toolbar()})}(window.jQuery);+function($){"use strict";var FilterWidget=function(element,options){var $el=this.$el=$(element);this.options=options||{}
|
||||
$(document).on('render',function(){$('[data-control=toolbar]').toolbar()})}(window.jQuery);+function($){"use strict";var FilterWidget=function(element,options){this.$el=$(element);this.options=options||{}
|
||||
this.scopeValues={}
|
||||
this.$activeScope=null
|
||||
this.activeScopeName=null
|
||||
|
|
@ -3186,7 +3185,7 @@ extraOptions.closeOnSelect=false
|
|||
$element.on('select2:closing',function(){$('.select2-dropdown.select-no-dropdown:first .select2-results__option--highlighted').removeClass('select2-results__option--highlighted')
|
||||
$('.select2-dropdown.select-no-dropdown:first .select2-results__option:first').addClass('select2-results__option--highlighted')})}}
|
||||
$element.select2($.extend({},selectOptions,extraOptions))})})
|
||||
$(document).on('disable','select.custom-select',function(event,status){if($(this).data('select2')!=null){$(this).select2('enable',!status)}})})(jQuery);+function($){"use strict";var LoadIndicator=function(element,options){var $el=this.$el=$(element)
|
||||
$(document).on('disable','select.custom-select',function(event,status){if($(this).data('select2')!=null){$(this).select2('enable',!status)}})})(jQuery);+function($){"use strict";var LoadIndicator=function(element,options){this.$el=$(element)
|
||||
this.options=options||{}
|
||||
this.tally=0
|
||||
this.show()}
|
||||
|
|
@ -3234,7 +3233,7 @@ return
|
|||
this.counter++
|
||||
if(this.counter>1)
|
||||
return
|
||||
var self=this,$window=$(window);if(event!==undefined&&event.clientY!==undefined){self.indicator.css({left:event.clientX+15,top:event.clientY+15})}
|
||||
var self=this;if(event!==undefined&&event.clientY!==undefined){self.indicator.css({left:event.clientX+15,top:event.clientY+15})}
|
||||
this.indicator.removeClass('hide')
|
||||
$(window).on('mousemove.cursorLoadIndicator',function(e){self.indicator.css({left:e.clientX+15,top:e.clientY+15,})})}
|
||||
CursorLoadIndicator.prototype.hide=function(force){if(Modernizr.touch)
|
||||
|
|
@ -3578,7 +3577,8 @@ this.defaultDataSetOptions={shadowSize:0}
|
|||
var parsedOptions={}
|
||||
try{parsedOptions=JSON.parse(JSON.stringify(eval("({"+options.chartOptions+"})")));}catch(e){throw new Error('Error parsing the data-chart-options attribute value. '+e);}
|
||||
this.chartOptions=$.extend({},this.chartOptions,parsedOptions)
|
||||
this.options=options,this.$el=$(element)
|
||||
this.options=options
|
||||
this.$el=$(element)
|
||||
this.fullDataSet=[]
|
||||
this.resetZoomLink=$(options.resetZoomLink)
|
||||
this.$el.trigger('oc.chartLineInit',[this])
|
||||
|
|
@ -3737,7 +3737,7 @@ $.fn.rowLink.Constructor=RowLink
|
|||
$.fn.rowLink.noConflict=function(){$.fn.rowLink=old
|
||||
return this}
|
||||
$(document).render(function(){$('[data-control="rowlink"]').rowLink()})}(window.jQuery);+function($){"use strict";var Base=$.oc.foundation.base,BaseProto=Base.prototype
|
||||
var ChangeMonitor=function(element,options){var $el=this.$el=$(element);this.paused=false
|
||||
var ChangeMonitor=function(element,options){this.$el=$(element);this.paused=false
|
||||
this.options=options||{}
|
||||
$.oc.foundation.controlUtils.markDisposable(element)
|
||||
Base.call(this)
|
||||
|
|
@ -3999,7 +3999,7 @@ $editorArea.codeEditor('getEditorObject').insert(this.textValue)}
|
|||
DragValue.prototype.handleClickContentEditable=function(){var sel,range,html;if(window.getSelection){sel=window.getSelection();if(sel.getRangeAt&&sel.rangeCount){range=sel.getRangeAt(0);range.deleteContents();range.insertNode(document.createTextNode(this.textValue));}}
|
||||
else if(document.selection&&document.selection.createRange){document.selection.createRange().text=this.textValue;}}
|
||||
DragValue.prototype.insertAtCaret=function(el,insertValue){if(document.selection){el.focus()
|
||||
sel=document.selection.createRange()
|
||||
var sel=document.selection.createRange()
|
||||
sel.text=insertValue
|
||||
el.focus()}
|
||||
else if(el.selectionStart||el.selectionStart=='0'){var startPos=el.selectionStart,endPos=el.selectionEnd,scrollTop=el.scrollTop
|
||||
|
|
@ -6542,7 +6542,8 @@ $list.on('dragenter','> li',this.proxy(this.onDragEnter))
|
|||
$list.on('dragleave','> li',this.proxy(this.onDragLeave))
|
||||
$list.on('drop','> li',this.proxy(this.onDragDrop))
|
||||
$list.on('dragend','> li',this.proxy(this.onDragEnd))}
|
||||
ListSortable.prototype.unregisterListHandlers=function(list){$list.off('dragstart','> li',this.proxy(this.onDragStart))
|
||||
ListSortable.prototype.unregisterListHandlers=function(list){var $list=$(list)
|
||||
$list.off('dragstart','> li',this.proxy(this.onDragStart))
|
||||
$list.off('dragover','> li',this.proxy(this.onDragOver))
|
||||
$list.off('dragenter','> li',this.proxy(this.onDragEnter))
|
||||
$list.off('dragleave','> li',this.proxy(this.onDragLeave))
|
||||
|
|
@ -6559,8 +6560,7 @@ this.unregisterHandlers()
|
|||
this.options=null
|
||||
this.lists=[]
|
||||
BaseProto.dispose.call(this)}
|
||||
ListSortable.prototype.elementBelongsToManagedList=function(element){for(var i=this.lists.length-1;i>=0;i--){var list=this.lists[i],children=[].slice.call(list.children)
|
||||
if(children.indexOf(element)!==-1){return true}}
|
||||
ListSortable.prototype.elementBelongsToManagedList=function(element){for(var i=this.lists.length-1;i>=0;i--){var list=this.lists[i],children=[].slice.call(list.children);if(children.indexOf(element)!==-1){return true}}
|
||||
return false}
|
||||
ListSortable.prototype.isDragStartAllowed=function(element){return true}
|
||||
ListSortable.prototype.elementIsPlaceholder=function(element){return element.getAttribute('class')==='list-sortable-placeholder'}
|
||||
|
|
|
|||
Loading…
Reference in New Issue