moksha/api/widgets/global_resources/widget.py | 8 ++------ moksha/widgets/moksha_js.py | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-)
New commits: commit 2eb77df057885ebb60bda57018745838722f6061 Author: Luke Macken lmacken@redhat.com Date: Fri Jul 9 17:56:09 2010 -0400
Break our moksha.js ToscaWidget out into it's own module
diff --git a/moksha/api/widgets/global_resources/widget.py b/moksha/api/widgets/global_resources/widget.py index 356f0aa..0fb9417 100644 --- a/moksha/api/widgets/global_resources/widget.py +++ b/moksha/api/widgets/global_resources/widget.py @@ -24,13 +24,9 @@ from paste.deploy.converters import asbool from pylons import request from inspect import isclass
-log = logging.getLogger(__name__) - -moksha_js = JSLink(modname="moksha", filename='public/javascript/moksha.js', - javascript=[jquery_js]) -moksha_extension_points_js = JSLink(modname="moksha", javascript=[moksha_js], - filename='public/javascript/moksha.extensions.js') +from moksha.widgets.moksha_js import moksha_js, moksha_extension_points_js
+log = logging.getLogger(__name__)
class GlobalResourceInjectionWidget(Widget): """ diff --git a/moksha/widgets/moksha_js.py b/moksha/widgets/moksha_js.py new file mode 100644 index 0000000..733be89 --- /dev/null +++ b/moksha/widgets/moksha_js.py @@ -0,0 +1,26 @@ +# This file is part of Moksha. +# Copyright (C) 2008-2010 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +from tw.api import JSLink +from tw.jquery import jquery_js + +moksha_js = JSLink(modname="moksha", + filename='public/javascript/moksha.js', + javascript=[jquery_js]) + +moksha_extension_points_js = JSLink(modname="moksha", + filename='public/javascript/moksha.extensions.js', + javascript=[moksha_js])
moksha-commits@lists.fedorahosted.org