initial commit
This commit is contained in:
commit
4b60ece582
327 changed files with 28286 additions and 0 deletions
8
magnus/lib/wModel/proxy/CMakeLists.txt
Normal file
8
magnus/lib/wModel/proxy/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
add_jslib(wModel/proxy/proxy.js lib/wModel/proxy/proxy ${MAGNUS_DIR} node)
|
||||
add_jslib(wModel/proxy/list.js lib/wModel/proxy/list ${MAGNUS_DIR} node)
|
||||
add_jslib(wModel/proxy/vocabulary.js lib/wModel/proxy/vocabulary ${MAGNUS_DIR} node)
|
||||
add_jslib(wModel/proxy/catalogue.js lib/wModel/proxy/catalogue ${MAGNUS_DIR} node)
|
||||
|
||||
configure_file(pane.js pane.js)
|
32
magnus/lib/wModel/proxy/pane.js
Normal file
32
magnus/lib/wModel/proxy/pane.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
"use strict";
|
||||
|
||||
var MVocabulary = require("./vocabulary");
|
||||
|
||||
var Address = require("../../wType/address");
|
||||
var Boolean = require("../../wType/boolean");
|
||||
|
||||
var Pane = MVocabulary.inherit({
|
||||
"className": "Pane",
|
||||
"constructor": function(address, controllerAddress, socket) {
|
||||
MVocabulary.fn.constructor.call(this, address, controllerAddress, socket);
|
||||
|
||||
if (this.constructor.pageAddress) {
|
||||
this.hasPageLink = true;
|
||||
|
||||
var id = address.back();
|
||||
this._pageLink = this.constructor.pageAddress["+"](new Address([id.toString()]));
|
||||
}
|
||||
},
|
||||
"_getAllData": function() {
|
||||
var vc = this.controller.data.clone();
|
||||
|
||||
vc.insert("hasPageLink", new Boolean(this.hasPageLink));
|
||||
if (this.hasPageLink) {
|
||||
vc.insert("pageLink", this._pageLink.clone());
|
||||
}
|
||||
|
||||
return vc;
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Pane;
|
Loading…
Add table
Add a link
Reference in a new issue