Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added app_[mvc] files to have an application wide layer

git-svn-id: https://dev.teemow.com/svn/jamal/code/trunk@32 794715e2-6a1e-0410-9566-dec274c41937
  • Loading branch information...
commit f58a0d4bd4d20d77abbe4d21f907e4814afce924 1 parent a9cace5
@teemow teemow authored
Showing with 120 additions and 0 deletions.
  1. +39 −0 src/app_controller.js
  2. +32 −0 src/app_model.js
  3. +49 −0 src/app_view.js
View
39 src/app_controller.js
@@ -0,0 +1,39 @@
+/* SVN FILE: $Id: jamal.js 18 2007-06-13 09:07:32Z teemow $ */
+/**
+ * To quote Dave Cardwell:
+ * Built on the shoulders of giants:
+ * * John Resig - http://jquery.com/
+ *
+ * Jamal : Javascript MVC Assembly Layout <http://jamal-mvc.com/>
+ * Copyright (c) 2007, Timo Derstappen <http://teemow.com/>
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright (c) 2007, Timo Derstappen
+ * @link
+ * @package jamal
+ * @subpackage jamal.session
+ * @since Jamal v 0.4
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+
+/**
+ * Jamal app controller
+ *
+ * @public
+ * @cat controller
+ */
+jamal.extend(jamal.fn.c.prototype, {
+ components: ['session', 'modal', 'remote_debug'],
+
+ beforeAction: function() {
+ },
+ afterAction: function() {
+ }
+
+});
View
32 src/app_model.js
@@ -0,0 +1,32 @@
+/* SVN FILE: $Id: jamal.js 18 2007-06-13 09:07:32Z teemow $ */
+/**
+ * To quote Dave Cardwell:
+ * Built on the shoulders of giants:
+ * * John Resig - http://jquery.com/
+ *
+ * Jamal : Javascript MVC Assembly Layout <http://jamal-mvc.com/>
+ * Copyright (c) 2007, Timo Derstappen <http://teemow.com/>
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright (c) 2007, Timo Derstappen
+ * @link
+ * @package jamal
+ * @subpackage jamal.session
+ * @since Jamal v 0.4
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+
+/**
+ * Jamal app model
+ *
+ * @public
+ * @cat model
+ */
+jamal.extend(jamal.fn.m.prototype, {
+});
View
49 src/app_view.js
@@ -0,0 +1,49 @@
+/* SVN FILE: $Id: jamal.js 18 2007-06-13 09:07:32Z teemow $ */
+/**
+ * To quote Dave Cardwell:
+ * Built on the shoulders of giants:
+ * * John Resig - http://jquery.com/
+ *
+ * Jamal : Javascript MVC Assembly Layout <http://jamal-mvc.com/>
+ * Copyright (c) 2007, Timo Derstappen <http://teemow.com/>
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright (c) 2007, Timo Derstappen
+ * @link
+ * @package jamal
+ * @subpackage jamal.session
+ * @since Jamal v 0.4
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+
+/**
+ * Jamal app view
+ *
+ * @public
+ * @cat view
+ */
+jamal.extend(jamal.fn.v.prototype, {
+ /**
+ * Add an error message
+ *
+ * @name addError
+ * @param String message The error message that should be displayed
+ * @param Mixed obj Element / jQuery object / css selector of an dom element which should contain the error message
+ */
+ addError: function(message) {
+ if (arguments.length>1) {
+ obj = arguments[1];
+ } else {
+ obj = $('tr.edit>td');
+ }
+ $('div.error', obj).remove();
+ $(obj).prepend(message);
+ $('div.error', obj).show();
+ }
+});
Please sign in to comment.
Something went wrong with that request. Please try again.