Skip to content

Commit

Permalink
Merge pull request octobercms#2461 from gpasztor87/develop
Browse files Browse the repository at this point in the history
JS fixes and typo
  • Loading branch information
daftspunk authored Nov 6, 2016
2 parents 50d3ffb + 98315b0 commit bea6109
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 44 deletions.
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/chart.bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
if (!data)
$this.data('oc.barChart', new BarChart(this, options))
})
}
}

$.fn.barChart.Constructor = BarChart

Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/chart.line.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/chart.meter.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
else
data.update(option)
})
}
}

$.fn.goalMeter.Constructor = GoalMeter

Expand Down
4 changes: 2 additions & 2 deletions modules/system/assets/ui/js/chart.pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -119,7 +119,7 @@
if (!data)
$this.data('oc.pieChart', new PieChart(this, options))
})
}
}

$.fn.pieChart.Constructor = PieChart

Expand Down
1 change: 1 addition & 0 deletions modules/system/assets/ui/js/chart.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

+function ($) { "use strict";

var ChartUtils = function() {}

ChartUtils.prototype.defaultValueColor = '#b8b8b8';
Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/checkbox.balloon.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

if (!data) $this.data('oc.balloon-selector', (data = new BalloonSelector(this, options)))
})
}
}

$.fn.balloonSelector.Constructor = BalloonSelector

Expand Down
6 changes: 3 additions & 3 deletions modules/system/assets/ui/js/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions modules/system/assets/ui/js/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

+function ($) { "use strict";

var Base = $.oc.foundation.base,
BaseProto = Base.prototype

Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/drag.scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
data[option].apply(data, methodArgs)
}
})
}
}

$.fn.dragScroll.Constructor = DragScroll

Expand Down
3 changes: 2 additions & 1 deletion modules/system/assets/ui/js/drag.sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

+function ($) { "use strict";

var Base = $.oc.foundation.base,
BaseProto = Base.prototype

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/drag.value.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
// IE
if (document.selection) {
el.focus()
sel = document.selection.createRange()
var sel = document.selection.createRange()
sel.text = insertValue
el.focus()
}
Expand Down
4 changes: 2 additions & 2 deletions modules/system/assets/ui/js/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

var FilterWidget = function (element, options) {

var $el = this.$el = $(element);
this.$el = $(element);

this.options = options || {}
this.scopeValues = {}
Expand Down Expand Up @@ -427,7 +427,7 @@
})

return result ? result : this
}
}

$.fn.filterWidget.Constructor = FilterWidget

Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/flashmessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

$(document.body).append($element)

setTimeout(function(){
setTimeout(function() {
$element.addClass('in')
}, 1)

Expand Down
3 changes: 1 addition & 2 deletions modules/system/assets/ui/js/foundation.baseclass.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
this.proxiedMethods = {}
}

Base.prototype.dispose = function()
{
Base.prototype.dispose = function() {
for (var key in this.proxiedMethods) {
this.proxiedMethods[key] = null
}
Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/foundation.controlutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules/system/assets/ui/js/input.hotkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -210,7 +210,7 @@
// HOTKEY DATA-API
// ==============

$(document).render(function(){
$(document).render(function() {
$('[data-hotkey]').hotKey()
})

Expand Down
4 changes: 2 additions & 2 deletions modules/system/assets/ui/js/input.monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {}
Expand Down Expand Up @@ -135,7 +135,7 @@

if (!data) $this.data('oc.changeMonitor', (data = new ChangeMonitor(this, options)))
})
}
}

$.fn.changeMonitor.Constructor = ChangeMonitor

Expand Down
3 changes: 2 additions & 1 deletion modules/system/assets/ui/js/input.preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@
// INPUT CONVERTER DATA-API
// ===============

$(document).render(function(){
$(document).render(function() {
$('[data-input-preset]').inputPreset()
})

}(window.jQuery);
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/input.trigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

if (!data) $this.data('oc.triggerOn', (data = new TriggerOn(this, options)))
})
}
}

$.fn.triggerOn.Constructor = TriggerOn

Expand Down
7 changes: 5 additions & 2 deletions modules/system/assets/ui/js/list.sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
*/

+function ($) { "use strict";

var Base = $.oc.foundation.base,
BaseProto = Base.prototype,
listSortableIdCounter = 0,
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -442,7 +445,7 @@
}
}
})
}
}

$.fn.listSortable.Constructor = ListSortable

Expand Down
4 changes: 2 additions & 2 deletions modules/system/assets/ui/js/loader.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

var LoadIndicator = function (element, options) {

var $el = this.$el = $(element)
this.$el = $(element)

this.options = options || {}
this.tally = 0
Expand Down Expand Up @@ -93,7 +93,7 @@
}
}
})
}
}

$.fn.loadIndicator.Constructor = LoadIndicator

Expand Down
6 changes: 2 additions & 4 deletions modules/system/assets/ui/js/loader.cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -73,7 +71,7 @@
}
}

$(document).ready(function(){
$(document).ready(function() {
$.oc.cursorLoadIndicator = new CursorLoadIndicator();
})

Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/ui/js/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
data[option].apply(data, methodArgs)
}
})
}
}

$.fn.ocPopover.Constructor = Popover

Expand Down
22 changes: 11 additions & 11 deletions modules/system/assets/ui/storm-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bea6109

Please sign in to comment.