|
|
@ -134,6 +134,7 @@ menu.events._open = function (id,uri,_context){
|
|
|
|
httpclient.setHeader('uri',uri)
|
|
|
|
httpclient.setHeader('uri',uri)
|
|
|
|
httpclient.setHeader('dom',id)
|
|
|
|
httpclient.setHeader('dom',id)
|
|
|
|
httpclient.post(_context+'/page',function(x){
|
|
|
|
httpclient.post(_context+'/page',function(x){
|
|
|
|
|
|
|
|
if(x.readyState == 4 && x.status == 200){
|
|
|
|
var _html = x.responseText
|
|
|
|
var _html = x.responseText
|
|
|
|
var _dom = $(_html)
|
|
|
|
var _dom = $(_html)
|
|
|
|
|
|
|
|
|
|
|
@ -143,13 +144,10 @@ menu.events._open = function (id,uri,_context){
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$(pid).append(_dom)
|
|
|
|
$(pid).append(_dom)
|
|
|
|
|
|
|
|
|
|
|
|
// jx.dom.append(pid,_dom)
|
|
|
|
|
|
|
|
// $('#'+id).show('fast',function(){
|
|
|
|
|
|
|
|
// $('#'+pid).slideUp()
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
var ref = pid + ' #'+id
|
|
|
|
var ref = pid + ' #'+id
|
|
|
|
|
|
|
|
menu.events.finalize (ref)
|
|
|
|
$(pid).children().slideUp('fast', function(){
|
|
|
|
$(pid).children().slideUp('fast', function(){
|
|
|
|
|
|
|
|
|
|
|
|
$(ref ).slideDown('fast',function(){
|
|
|
|
$(ref ).slideDown('fast',function(){
|
|
|
|
|
|
|
|
|
|
|
|
$(pid).slideDown('fast',function(){
|
|
|
|
$(pid).slideDown('fast',function(){
|
|
|
@ -163,7 +161,8 @@ menu.events._open = function (id,uri,_context){
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
menu.events.finalize (ref)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $('.content').append(_dom)
|
|
|
|
// $('.content').append(_dom)
|
|
|
@ -177,6 +176,7 @@ menu.utils.format = function(text){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
menu.events.finalize = function (ref) {
|
|
|
|
menu.events.finalize = function (ref) {
|
|
|
|
var scripts = $(ref+' script')
|
|
|
|
var scripts = $(ref+' script')
|
|
|
|
|
|
|
|
|
|
|
|
jx.utils.patterns.visitor(scripts,function(_item){
|
|
|
|
jx.utils.patterns.visitor(scripts,function(_item){
|
|
|
|
if(_item.text.trim().length > 0){
|
|
|
|
if(_item.text.trim().length > 0){
|
|
|
|
|
|
|
|
|
|
|
@ -280,12 +280,16 @@ var QCMSTabs = function(_layout,_context,_clickEvent){
|
|
|
|
_button.name = 'menu-tabs'
|
|
|
|
_button.name = 'menu-tabs'
|
|
|
|
_label.innerHTML = text.toLowerCase()
|
|
|
|
_label.innerHTML = text.toLowerCase()
|
|
|
|
_label._uri = _item[0].uri
|
|
|
|
_label._uri = _item[0].uri
|
|
|
|
|
|
|
|
_button._uri = _label._uri
|
|
|
|
|
|
|
|
_button.value= text.toLowerCase()
|
|
|
|
_label.htmlFor = _button.id
|
|
|
|
_label.htmlFor = _button.id
|
|
|
|
$(_label).on('click',function (){
|
|
|
|
$(_label).on('click',function (){
|
|
|
|
|
|
|
|
|
|
|
|
menu.events._open(this.innerHTML,this._uri,_context)
|
|
|
|
menu.events._open(this.innerHTML,this._uri,_context)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// $(this.tabs).append( [_button,_label])
|
|
|
|
// $(_button).on('click',function (){
|
|
|
|
|
|
|
|
// menu.events._open(this.value,this._uri,_context) ;})
|
|
|
|
|
|
|
|
|
|
|
|
return [_button,_label]
|
|
|
|
return [_button,_label]
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -316,7 +320,8 @@ var QCMSTabs = function(_layout,_context,_clickEvent){
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
menu.tabs = { }
|
|
|
|
menu.delegate = { }
|
|
|
|
|
|
|
|
|
|
|
|
// menu.tabs.make = function(text,_clickEvent){
|
|
|
|
// menu.tabs.make = function(text,_clickEvent){
|
|
|
|
// var _id = text.trim()
|
|
|
|
// var _id = text.trim()
|
|
|
|
// if (text.match(/\//)){
|
|
|
|
// if (text.match(/\//)){
|
|
|
@ -331,7 +336,7 @@ menu.tabs = { }
|
|
|
|
// $(_label).on('click',_clickEvent)
|
|
|
|
// $(_label).on('click',_clickEvent)
|
|
|
|
// return [_button,_label]
|
|
|
|
// return [_button,_label]
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
menu.tabs.init =function (_layout,_context){
|
|
|
|
menu.init =function (_layout,_context){
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Let us determine what kind of menu is suited for this
|
|
|
|
// Let us determine what kind of menu is suited for this
|
|
|
|
// @TODO: Make menus configurable i.e on other areas of the site
|
|
|
|
// @TODO: Make menus configurable i.e on other areas of the site
|
|
|
@ -361,10 +366,9 @@ menu.tabs.init =function (_layout,_context){
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
var _menuObject = new QCMSBasic (_layout,_context)
|
|
|
|
var _menuObject = new QCMSBasic (_layout,_context)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// console.log(_layout)
|
|
|
|
|
|
|
|
// var _tabs = new QCMSTabs (_layout)
|
|
|
|
|
|
|
|
console.log(_menuObject)
|
|
|
|
|
|
|
|
_menuObject.init()
|
|
|
|
_menuObject.init()
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|