Rename framework module.

This commit is contained in:
Paulo Veiga 2011-09-06 10:01:48 -03:00
parent 1b2c7b1ce2
commit 6468f6f0bc
9 changed files with 33 additions and 33 deletions

View File

@ -156,17 +156,17 @@
<filelist dir="${basedir}/src/main/javascript/" <filelist dir="${basedir}/src/main/javascript/"
files="collaboration/CollaborationManager.js"/> files="collaboration/CollaborationManager.js"/>
<filelist dir="${basedir}/src/main/javascript/" <filelist dir="${basedir}/src/main/javascript/"
files="collaboration/frameworks/AbstractCollaborativeFramework.js"/> files="collaboration/framework/AbstractCollaborativeFramework.js"/>
<filelist dir="${basedir}/src/main/javascript/" <filelist dir="${basedir}/src/main/javascript/"
files="collaboration/frameworks/AbstractCollaborativeModelFactory.js"/> files="collaboration/framework/AbstractCollaborativeModelFactory.js"/>
<filelist dir="${basedir}/src/main/javascript/" <filelist dir="${basedir}/src/main/javascript/"
files="collaboration/frameworks/brix/model/NodeModel.js"/> files="collaboration/framework/brix/model/NodeModel.js"/>
<filelist dir="${basedir}/src/main/javascript/" <filelist dir="${basedir}/src/main/javascript/"
files="collaboration/frameworks/brix/model/Mindmap.js"/> files="collaboration/framework/brix/model/Mindmap.js"/>
<filelist dir="${basedir}/src/main/javascript/" <filelist dir="${basedir}/src/main/javascript/"
files="collaboration/frameworks/brix/BrixCollaborativeModelFactory.js"/> files="collaboration/framework/brix/BrixCollaborativeModelFactory.js"/>
<filelist dir="${basedir}/src/main/javascript/" <filelist dir="${basedir}/src/main/javascript/"
files="collaboration/frameworks/brix/BrixFramework.js"/> files="collaboration/framework/brix/BrixFramework.js"/>
<filelist dir="${basedir}/src/main/javascript/widget/" files="ToolbarItem.js"/> <filelist dir="${basedir}/src/main/javascript/widget/" files="ToolbarItem.js"/>

View File

@ -1,4 +1,4 @@
mindplot.collaboration.frameworks.AbstractCollaborativeFramework = new Class({ mindplot.collaboration.framework.AbstractCollaborativeFramework = new Class({
initialize: function(model, collaborativeModelFactory) { initialize: function(model, collaborativeModelFactory) {
this._collaborativeModelFactory = collaborativeModelFactory; this._collaborativeModelFactory = collaborativeModelFactory;
if (!$defined(model)) { if (!$defined(model)) {

View File

@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
mindplot.collaboration.frameworks.AbstractCollaborativeModelFactory = new Class({ mindplot.collaboration.framework.AbstractCollaborativeModelFactory = new Class({
initialize:function() { initialize:function() {
}, },
buildMindMap:function() { buildMindMap:function() {

View File

@ -16,15 +16,15 @@
* limitations under the License. * limitations under the License.
*/ */
mindplot.collaboration.frameworks.brix.BrixCollaborativeModelFactory = new Class({ mindplot.collaboration.framework.brix.BrixCollaborativeModelFactory = new Class({
Extends:mindplot.collaboration.frameworks.AbstractCollaborativeModelFactory, Extends:mindplot.collaboration.framework.AbstractCollaborativeModelFactory,
initialize:function(brixFramework) { initialize:function(brixFramework) {
this._brixFramework = brixFramework; this._brixFramework = brixFramework;
}, },
buildMindMap:function() { buildMindMap:function() {
return new mindplot.collaboration.frameworks.brix.model.Mindmap(null, this._brixFramework); return new mindplot.collaboration.framework.brix.model.Mindmap(null, this._brixFramework);
}, },
buildCollaborativeModelFor:function(model) { buildCollaborativeModelFor:function(model) {
return new mindplot.collaboration.frameworks.brix.model.Mindmap(model, this._brixFramework); return new mindplot.collaboration.framework.brix.model.Mindmap(model, this._brixFramework);
} }
}); });

View File

@ -16,11 +16,11 @@
* limitations under the License. * limitations under the License.
*/ */
mindplot.collaboration.frameworks.brix.BrixFramework = new Class({ mindplot.collaboration.framework.brix.BrixFramework = new Class({
Extends: mindplot.collaboration.frameworks.AbstractCollaborativeFramework, Extends: mindplot.collaboration.framework.AbstractCollaborativeFramework,
initialize: function(model, app) { initialize: function(model, app) {
this._app = app; this._app = app;
var collaborativeModelFactory = new mindplot.collaboration.frameworks.brix.BrixCollaborativeModelFactory(this); var collaborativeModelFactory = new mindplot.collaboration.framework.brix.BrixCollaborativeModelFactory(this);
var cModel = null; var cModel = null;
var root = this.getBrixModel().getRoot(); var root = this.getBrixModel().getRoot();
if (!root.isEmpty()) { if (!root.isEmpty()) {
@ -41,20 +41,20 @@ mindplot.collaboration.frameworks.brix.BrixFramework = new Class({
}); });
instanciated = false; instanciated = false;
mindplot.collaboration.frameworks.brix.BrixFramework.instanciate = function() { mindplot.collaboration.framework.brix.BrixFramework.instanciate = function() {
if ((typeof isGoogleBrix != "undefined") && !instanciated) { if ((typeof isGoogleBrix != "undefined") && !instanciated) {
instanciated = true; instanciated = true;
var app = new goog.collab.CollaborativeApp(); var app = new goog.collab.CollaborativeApp();
mindplot.collaboration.frameworks.brix.BrixFramework.buildMenu(app); mindplot.collaboration.framework.brix.BrixFramework.buildMenu(app);
app.start(); app.start();
app.addListener('modelLoad', function(model) { app.addListener('modelLoad', function(model) {
var framework = new mindplot.collaboration.frameworks.brix.BrixFramework(model, app); var framework = new mindplot.collaboration.framework.brix.BrixFramework(model, app);
mindplot.collaboration.CollaborationManager.getInstance().setCollaborativeFramework(framework); mindplot.collaboration.CollaborationManager.getInstance().setCollaborativeFramework(framework);
}.bind(this)); }.bind(this));
} }
}; };
mindplot.collaboration.frameworks.brix.BrixFramework.buildMenu = function(app) { mindplot.collaboration.framework.brix.BrixFramework.buildMenu = function(app) {
var menuBar = new goog.collab.ui.MenuBar(); var menuBar = new goog.collab.ui.MenuBar();
// Configure toolbar menu ... // Configure toolbar menu ...
@ -80,6 +80,6 @@ mindplot.collaboration.frameworks.brix.BrixFramework.buildMenu = function(app) {
app.setMenuBar(menuBar); app.setMenuBar(menuBar);
}; };
mindplot.collaboration.frameworks.brix.BrixFramework.instanciate(); mindplot.collaboration.framework.brix.BrixFramework.instanciate();

View File

@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
mindplot.collaboration.frameworks.brix.model.Mindmap = new Class({ mindplot.collaboration.framework.brix.model.Mindmap = new Class({
Extends:mindplot.model.Mindmap, Extends:mindplot.model.Mindmap,
initialize:function(brixModel, brixFramework){ initialize:function(brixModel, brixFramework){
this.parent(); this.parent();
@ -27,7 +27,7 @@ mindplot.collaboration.frameworks.brix.model.Mindmap = new Class({
var branches = this._brixModel.get("branches"); var branches = this._brixModel.get("branches");
for(var i=0; i<branches.size(); i++){ for(var i=0; i<branches.size(); i++){
var node = branches.get(i); var node = branches.get(i);
var nodeModel = new mindplot.collaboration.frameworks.brix.model.NodeModel(node, this._brixFramework, null, this); var nodeModel = new mindplot.collaboration.framework.brix.model.NodeModel(node, this._brixFramework, null, this);
this.addBranch(nodeModel, false); this.addBranch(nodeModel, false);
} }
} }
@ -85,7 +85,7 @@ mindplot.collaboration.frameworks.brix.model.Mindmap = new Class({
}, },
_createNode : function(type, id) { _createNode : function(type, id) {
$assert(type, 'Node type must be specified.'); $assert(type, 'Node type must be specified.');
var result = new mindplot.collaboration.frameworks.brix.model.NodeModel(null, this._brixFramework, type, this, id); var result = new mindplot.collaboration.framework.brix.model.NodeModel(null, this._brixFramework, type, this, id);
return result; return result;
}, },

View File

@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
mindplot.collaboration.frameworks.brix.model.NodeModel = new Class({ mindplot.collaboration.framework.brix.model.NodeModel = new Class({
Extends: mindplot.model.NodeModel, Extends: mindplot.model.NodeModel,
Attributes: ['text','fontSize','fontFamily','fontStyle','fontColor','fontWeight','borderColor','backgroundColor','shapeType'], Attributes: ['text','fontSize','fontFamily','fontStyle','fontColor','fontWeight','borderColor','backgroundColor','shapeType'],
initialize : function(brixModel, brixFramework, type, mindmap, id) { initialize : function(brixModel, brixFramework, type, mindmap, id) {
@ -36,7 +36,7 @@ mindplot.collaboration.frameworks.brix.model.NodeModel = new Class({
} else { } else {
// Call all the required setters for simple properties ... // Call all the required setters for simple properties ...
var keys = mindplot.collaboration.frameworks.brix.model.NodeModel.prototype.Attributes; var keys = mindplot.collaboration.framework.brix.model.NodeModel.prototype.Attributes;
keys.forEach(function(key) { keys.forEach(function(key) {
// Call setters ... // Call setters ...
@ -53,7 +53,7 @@ mindplot.collaboration.frameworks.brix.model.NodeModel = new Class({
var children = this._brixModel.get("children"); var children = this._brixModel.get("children");
for (var i = 0; i < children.size(); i++) { for (var i = 0; i < children.size(); i++) {
var bChild = children.get(i); var bChild = children.get(i);
var child = new mindplot.collaboration.frameworks.brix.model.NodeModel(bChild, this._brixFramework, null, mindmap); var child = new mindplot.collaboration.framework.brix.model.NodeModel(bChild, this._brixFramework, null, mindmap);
this._appendChild(child, false); this._appendChild(child, false);
} }
} }
@ -61,7 +61,7 @@ mindplot.collaboration.frameworks.brix.model.NodeModel = new Class({
}, },
_injectSetAndGet : function() { _injectSetAndGet : function() {
var keys = mindplot.collaboration.frameworks.brix.model.NodeModel.prototype.Attributes; var keys = mindplot.collaboration.framework.brix.model.NodeModel.prototype.Attributes;
keys.forEach(function(key) { keys.forEach(function(key) {
// Create setters ... // Create setters ...
@ -101,7 +101,7 @@ mindplot.collaboration.frameworks.brix.model.NodeModel = new Class({
_childAddedListener:function(event) { _childAddedListener:function(event) {
var newValue = event.getValues().get(0); var newValue = event.getValues().get(0);
var cmodel = new mindplot.collaboration.frameworks.brix.model.NodeModel(newValue, this._brixFramework, null, this.getMindmap()); var cmodel = new mindplot.collaboration.framework.brix.model.NodeModel(newValue, this._brixFramework, null, this.getMindmap());
this._appendChild(cmodel, false); this._appendChild(cmodel, false);
var model = new mindplot.model.NodeModel(newValue.get("type"), designer.getMindmap(), newValue.get("id")); var model = new mindplot.model.NodeModel(newValue.get("type"), designer.getMindmap(), newValue.get("id"));

View File

@ -23,6 +23,6 @@ mindplot.layout = {};
mindplot.widget = {}; mindplot.widget = {};
mindplot.model = {}; mindplot.model = {};
mindplot.collaboration = {}; mindplot.collaboration = {};
mindplot.collaboration.frameworks = {}; mindplot.collaboration.framework = {};
mindplot.collaboration.frameworks.brix = {}; mindplot.collaboration.framework.brix = {};
mindplot.collaboration.frameworks.brix.model = {}; mindplot.collaboration.framework.brix.model = {};

View File

@ -33,8 +33,8 @@
//Google-Brix framework load callback function //Google-Brix framework load callback function
collabOnLoad = function() { collabOnLoad = function() {
isGoogleBrix = true; isGoogleBrix = true;
if (typeof mindplot != "undefined") { if ($defined(mindplot) && $defined(mindplot.collaboration) && $defined(mindplot.collaboration.framework)) {
mindplot.collaboration.frameworks.brix.BrixFramework.instanciate(); mindplot.collaboration.framework.brix.BrixFramework.instanciate();
} }
}; };
</script> </script>