* Added Story.add() method as counterpart to Story.remove() and to establish kind of internal API

* Rewrote external API (Api prototype) reducing redundant code by calling Story.add() method
This commit is contained in:
Tobi Schäfer 2011-03-15 20:22:08 +00:00
parent fe159c3112
commit 2ca26e4f28
7 changed files with 70 additions and 53 deletions

View file

@ -19,8 +19,8 @@
// limitations under the License.
//
// $Revision$
// $LastChangedBy$
// $LastChangedDate$
// $Author$
// $Date$
// $URL$
app.addRepository("modules/helma/Aspects.js");
@ -209,11 +209,11 @@ Site.prototype.onCodeUpdate = function() {
}
Story.prototype.onCodeUpdate = function() {
helma.aspects.addBefore(this, "edit_action", aspects.fixStoryEditorParams);
helma.aspects.addBefore(this, "edit_action", aspects.fixStoryEditorParams);
return helma.aspects.addBefore(this, "update", aspects.setTopics);
}
Stories.prototype.onCodeUpdate = function() {
return helma.aspects.addBefore(this, "create_action",
return helma.aspects.addBefore(this, "create_action",
aspects.fixStoryEditorParams);
}