diff --git a/source/Ox.UI/Ox.UI.js b/source/Ox.UI/Ox.UI.js index 9aa4c683..78eb53d5 100644 --- a/source/Ox.UI/Ox.UI.js +++ b/source/Ox.UI/Ox.UI.js @@ -163,9 +163,8 @@ Ox.load.UI = function(options, callback) { var link = Ox.element('') .attr({ href: browser.url, - title: isInternetExplorer - ? (browser.name == 'Chrome Frame' ? 'Install' : 'Download') + ' ' + browser.name - : browser.name + ' ' + browser.version + title: (browser.name == 'Chrome Frame' ? 'Install' : 'Download') + + ' ' + browser.name }) .css({ position: 'absolute', diff --git a/source/Ox.UI/js/Core/Ox.URL.js b/source/Ox.UI/js/Core/Ox.URL.js index 10be5440..39e70402 100644 --- a/source/Ox.UI/js/Core/Ox.URL.js +++ b/source/Ox.UI/js/Core/Ox.URL.js @@ -205,12 +205,12 @@ Ox.URL = function(options) { var sortKeys = self.options.sortKeys[state.type][ !state.item ? 'list' : 'item' ][state.view]; - return sort.map(function(sort) { + return sortKeys ? sort.map(function(sort) { return ( Ox.getObjectById(sortKeys, sort.key).operator == sort.operator ? '' : sort.operator ) + sort.key; - }).join(','); + }).join(',') : ''; } function constructSpan(span, state) { @@ -574,9 +574,7 @@ Ox.URL = function(options) { } function saveURL() { - self.previousURL = document.location.pathname - + document.location.search - + document.location.hash; + } that._construct = function(state) { @@ -603,7 +601,7 @@ Ox.URL = function(options) { pop Sets the URL to the previous URL @*/ that.pop = function() { - history.pushState(self.previousURL); + history.pushState({}, '', self.previousURL); return that; }; @@ -632,7 +630,11 @@ Ox.URL = function(options) { pushState(state, title, url); } function pushState(state, title, url) { - history.pushState(state, title, url); + self.previousURL = document.location.pathname + + document.location.search + + document.location.hash; + history.pushState(Ox.extend(state, {title: title}), '', url); + document.title = title; callback && callback(state); } } @@ -660,7 +662,8 @@ Ox.URL = function(options) { replaceState(state, title, url); } function replaceState(state, title, url) { - history.replaceState(state, title, url); + history.replaceState(Ox.extend(state, {title: title}), '', url); + document.title = title; callback && callback(state); } } diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index d60a7b63..c1670dad 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -192,6 +192,13 @@ Ox.List = function(options, self) { } if (!self.isAsync) { + self.$page = Ox.Element() + .addClass('OxPage') + .css({ + left: self.listMargin / 2 + 'px', + top: self.listMargin / 2 + 'px' + }) + .appendTo(that.$content); self.listLength = self.options.items.length; loadItems(); } else { @@ -678,7 +685,7 @@ Ox.List = function(options, self) { } function loadItems() { - that.$content.empty(); + self.$page.empty(); self.$items = []; self.options.items.forEach(function(item, pos) { // fixme: duplicated @@ -689,7 +696,7 @@ Ox.List = function(options, self) { unique: self.options.unique }); isSelected(pos) && self.$items[pos].addClass('OxSelected'); - self.$items[pos].appendTo(that.$content); + self.$items[pos].appendTo(self.$page); }); self.selected.length && scrollToPosition(self.selected[0]); // that.triggerEvent('init', {items: self.options.items.length}); diff --git a/source/Ox.js b/source/Ox.js index 75958aa4..1100597f 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -80,7 +80,7 @@ Ox = { function loadScript(script, callback) { var element = document.createElement('script'); element.onload = callback; - element.src = path + script + '?' + parseInt(Math.random(1000000)); + element.src = path + script + '?' + parseInt(Math.random() * 1000000); element.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(element); } diff --git a/source/Ox/js/RegExp.js b/source/Ox/js/RegExp.js index e69de29b..3d0d2e1d 100644 --- a/source/Ox/js/RegExp.js +++ b/source/Ox/js/RegExp.js @@ -0,0 +1 @@ +// Opera doesn't like empty js files \ No newline at end of file