mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f23858233a
commit
3c74080224
@ -98,9 +98,9 @@ function(msg, options){
|
|||||||
options.hide_on_search = options.hide_on_search !== undefined ?
|
options.hide_on_search = options.hide_on_search !== undefined ?
|
||||||
options.hide_on_search
|
options.hide_on_search
|
||||||
: true
|
: true
|
||||||
|
options.cls = (options.cls || '') + ' empty-msg'
|
||||||
msg = msg || options.message || 'Empty...'
|
msg = msg || options.message || 'Empty...'
|
||||||
return this(msg, options)
|
return this(msg, options)
|
||||||
.addClass('empty-msg')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -125,18 +125,23 @@ function(options){
|
|||||||
//
|
//
|
||||||
Items.Heading =
|
Items.Heading =
|
||||||
function(text, options){
|
function(text, options){
|
||||||
var attrs = (options && options.doc) ? {doc: options.doc} : {}
|
options = Object.create(options || {})
|
||||||
|
options.cls = (options.cls || '') + ' heading'
|
||||||
|
var attrs = options.doc ? {doc: options.doc} : {}
|
||||||
|
attrs.__proto__ = options.attrs || {}
|
||||||
|
options.attrs = attrs
|
||||||
return this(text, options)
|
return this(text, options)
|
||||||
.attr(attrs)
|
}
|
||||||
.addClass('heading') }
|
|
||||||
|
|
||||||
// Action...
|
// Action...
|
||||||
//
|
//
|
||||||
// XXX should this have a callback???
|
// XXX should this have a callback???
|
||||||
Items.Action =
|
Items.Action =
|
||||||
function(text, options){
|
function(text, options){
|
||||||
|
options = Object.create(options || {})
|
||||||
|
options.cls = (options.cls || '') + ' action'
|
||||||
return this(text, options)
|
return this(text, options)
|
||||||
.addClass('action') }
|
}
|
||||||
|
|
||||||
// Action requiring confirmation...
|
// Action requiring confirmation...
|
||||||
//
|
//
|
||||||
@ -162,6 +167,7 @@ function(text, options){
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// XXX doc...
|
// XXX doc...
|
||||||
|
// XXX refactor to use options instead of elem modification...
|
||||||
Items.ConfirmAction =
|
Items.ConfirmAction =
|
||||||
function(text, options){
|
function(text, options){
|
||||||
options = options || {}
|
options = options || {}
|
||||||
@ -2230,6 +2236,11 @@ var BrowserPrototype = {
|
|||||||
// <event>: <handler>,
|
// <event>: <handler>,
|
||||||
// ...
|
// ...
|
||||||
// },
|
// },
|
||||||
|
//
|
||||||
|
// attrs: {
|
||||||
|
// <attr>: <value>,
|
||||||
|
// ...
|
||||||
|
// },
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// <buttons> format (optional):
|
// <buttons> format (optional):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user