fix margins of static icon lists
This commit is contained in:
parent
4d13b8444b
commit
2698bec700
5 changed files with 24 additions and 14 deletions
|
@ -163,9 +163,8 @@ Ox.load.UI = function(options, callback) {
|
|||
var link = Ox.element('<a>')
|
||||
.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',
|
||||
|
|
|
@ -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 <f> 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
// Opera doesn't like empty js files
|
Loading…
Reference in a new issue