@ -72,23 +72,36 @@ qcms.menu.Basic = function (_layout,_outputId,_domId){
$ ( _div ) . on ( 'click' , function ( ) {
//
// how do we process this ...
if ( this . data . uri && this . data . type != 'open' ) {
if ( this . data . type == 'dialog' ) {
console . log ( this . data )
if ( this . data . type == 'redirect' ) {
window . open ( this . data . url , _me . _format ( this . data . text ) )
} else if ( this . data . type == 'dialog' ) {
qcms . dialog . show ( this . data )
} else {
_me . _open ( _me . _format ( this . data . text ) , this . data . uri , _parentId )
}
} else if ( this . data . type == 'open' ) {
window . open ( this . data . uri , '_self' )
} else {
//
// redirecting
if ( this . data . uri != null ) {
window . open ( this . data . uri , '_self' )
} else {
window . open ( this . data . url , _format ( this . data . text ) )
}
_me . _open ( _me . _format ( this . data . text ) , this . data . uri , _parentId )
}
// if(this.data.uri && this.data.type != 'open') {
// if (this.data.type == 'dialog') {
// qcms.dialog.show(this.data)
// }else{
// _me._open(_me._format(this.data.text),this.data.uri,_parentId)
// }
// }else{
// //
// // redirecting
// if (this.data.uri != null){
// window.open(this.data.uri,'_self')
// }else{
// window.open(this.data.url,_format(this.data.text))
// }
// }
} )
@ -160,8 +173,10 @@ qcms.menu.Tabs = function (_layout,_outputId,_domId){
// var _parentId = this._parentId
var _me = this ;
$ ( _label ) . on ( 'click' , function ( ) {
_me . _open ( this . data . id , this . data . uri , _me . _parentId )
alert ( '....' )
// _me._open(this.data.id,this.data.uri,_me._parentId)
console . log ( [ _me . _format ( this . data . text ) , this . data . uri , _parentId ] )
_me . _open ( _me . _format ( this . data . text ) , this . data . uri , _parentId )
} )
return [ _button , _label ]
@ -170,10 +185,11 @@ qcms.menu.Tabs = function (_layout,_outputId,_domId){
var _names = _layout . order . menu . length > 0 ? _layout . order . menu : Object . keys ( _layout . menu )
// Object.keys(_layout.menu).
_names . forEach ( function ( _ key ) {
_item = _layout . menu [ _ key ]
_names . forEach ( function ( _ text ) {
_item = _layout . menu [ _ text ]
// console.log([_item])
_tabItem = this . _build ( _key , _item )
_tabItem = this . _build ( _text , _item )
$ ( tabs ) . append ( _tabItem )
} )