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