the imports start to be a bit numerous shouldn't we use an AMD loader or optimize our js in our maven build?
- Romain 2012/6/15 <[email protected]> > Author: tveronezi > Date: Fri Jun 15 14:08:51 2012 > New Revision: 1350631 > > URL: http://svn.apache.org/viewvc?rev=1350631&view=rev > Log: > https://issues.apache.org/jira/browse/TOMEE-228 > * externalizing code > > Added: > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/ApplicationsLog.js > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/Mdbs.js > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/WebServices.js > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewApps.js > - copied, changed from r1350555, > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewApps.js > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewHome.js > - copied, changed from r1350555, > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewHome.js > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewLog.js > - copied unchanged from r1350555, > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewLog.js > Removed: > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewApps.js > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewHome.js > > > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewLog.js > Modified: > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/index.html > > Added: > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/ApplicationsLog.js > URL: > http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/ApplicationsLog.js?rev=1350631&view=auto > > ============================================================================== > --- > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/ApplicationsLog.js > (added) > +++ > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/ApplicationsLog.js > Fri Jun 15 14:08:51 2012 > @@ -0,0 +1,39 @@ > +/** > + * > + * Licensed to the Apache Software Foundation (ASF) under one or more > + * contributor license agreements. See the NOTICE file distributed with > + * this work for additional information regarding copyright ownership. > + * The ASF licenses this file to You under the Apache License, Version 2.0 > + * (the "License"); you may not use this file except in compliance with > + * the License. You may obtain a copy of the License at > + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > implied. > + * See the License for the specific language governing permissions and > + * limitations under the License. > + */ > + > +TOMEE.ApplicationsLog = function (cfg) { > + "use strict"; > + > + var channel = cfg.channel; > + > + var panel = TOMEE.components.Panel({ > + title:'-' > + }); > + > + //Log here! > + panel.getContentEl().append(''); > + > + return { > + getEl:function () { > + return panel.getEl(); > + }, > + setHeight:function (height) { > + panel.setHeight(height); > + } > + }; > +}; > \ No newline at end of file > > Added: > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/Mdbs.js > URL: > http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/Mdbs.js?rev=1350631&view=auto > > ============================================================================== > --- > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/Mdbs.js > (added) > +++ > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/Mdbs.js > Fri Jun 15 14:08:51 2012 > @@ -0,0 +1,33 @@ > +/** > + * > + * Licensed to the Apache Software Foundation (ASF) under one or more > + * contributor license agreements. See the NOTICE file distributed with > + * this work for additional information regarding copyright ownership. > + * The ASF licenses this file to You under the Apache License, Version 2.0 > + * (the "License"); you may not use this file except in compliance with > + * the License. You may obtain a copy of the License at > + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > implied. > + * See the License for the specific language governing permissions and > + * limitations under the License. > + */ > + > +TOMEE.MDBs = function (cfg) { > + "use strict"; > + > + var channel = cfg.channel; > + > + var mdbs = TOMEE.components.Panel({ > + title:TOMEE.I18N.get('application.mdbs') > + }); > + > + return { > + getEl:function () { > + return mdbs.getEl(); > + } > + }; > +}; > \ No newline at end of file > > Added: > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/WebServices.js > URL: > http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/WebServices.js?rev=1350631&view=auto > > ============================================================================== > --- > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/WebServices.js > (added) > +++ > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/panels/WebServices.js > Fri Jun 15 14:08:51 2012 > @@ -0,0 +1,33 @@ > +/** > + * > + * Licensed to the Apache Software Foundation (ASF) under one or more > + * contributor license agreements. See the NOTICE file distributed with > + * this work for additional information regarding copyright ownership. > + * The ASF licenses this file to You under the Apache License, Version 2.0 > + * (the "License"); you may not use this file except in compliance with > + * the License. You may obtain a copy of the License at > + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > implied. > + * See the License for the specific language governing permissions and > + * limitations under the License. > + */ > + > +TOMEE.WebServices = function (cfg) { > + "use strict"; > + > + var channel = cfg.channel; > + > + var ws = TOMEE.components.Panel({ > + title:TOMEE.I18N.get('application.ws') > + }); > + > + return { > + getEl:function () { > + return ws.getEl(); > + } > + }; > +}; > \ No newline at end of file > > Copied: > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewApps.js > (from r1350555, > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewApps.js) > URL: > http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewApps.js?p2=openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewApps.js&p1=openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewApps.js&r1=1350555&r2=1350631&rev=1350631&view=diff > > ============================================================================== > --- > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewApps.js > (original) > +++ > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewApps.js > Fri Jun 15 14:08:51 2012 > @@ -49,23 +49,9 @@ TOMEE.ApplicationViewApps = function (cf > channel:channel > }); > > - var log = (function () { > - var panel = TOMEE.components.Panel({ > - title:'-' > - }); > - > - //Log here! > - panel.getContentEl().append(''); > - > - return { > - getEl:function () { > - return panel.getEl(); > - }, > - setHeight:function (height) { > - panel.setHeight(height); > - } > - }; > - })(); > + var log = TOMEE.ApplicationsLog({ > + channel:channel > + }); > > elMapContent['left'].append(deployments.getEl()); > elMapContent['center'].append(log.getEl()); > > Copied: > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewHome.js > (from r1350555, > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewHome.js) > URL: > http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewHome.js?p2=openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewHome.js&p1=openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewHome.js&r1=1350555&r2=1350631&rev=1350631&view=diff > > ============================================================================== > --- > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/ApplicationViewHome.js > (original) > +++ > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/application/js/view/tabs/ApplicationViewHome.js > Fri Jun 15 14:08:51 2012 > @@ -74,29 +74,13 @@ TOMEE.ApplicationViewHome = function (cf > > elMapContent['center'].append(consolePanel.getEl()); > > - var mdbsPanel = (function () { > - var mdbs = TOMEE.components.Panel({ > - title:TOMEE.I18N.get('application.mdbs') > - }); > - > - return { > - getEl:function () { > - return mdbs.getEl(); > - } > - }; > - })(); > - > - var wsPanel = (function () { > - var ws = TOMEE.components.Panel({ > - title:TOMEE.I18N.get('application.ws') > - }); > - > - return { > - getEl:function () { > - return ws.getEl(); > - } > - }; > - })(); > + var mdbsPanel = TOMEE.MDBs({ > + channel:cfg.channel > + }); > + > + var wsPanel = TOMEE.WebServices({ > + channel:cfg.channel > + }); > > elMapContent['right'].append(mdbsPanel.getEl()); > elMapContent['right'].append(wsPanel.getEl()); > > Modified: > openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/index.html > URL: > http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/index.html?rev=1350631&r1=1350630&r2=1350631&view=diff > > ============================================================================== > --- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/index.html > (original) > +++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/index.html > Fri Jun 15 14:08:51 2012 > @@ -30,9 +30,10 @@ > > <script src="application/js/view/ApplicationToolbar.js"></script> > <script src="application/js/view/ApplicationView.js"></script> > - <script src="application/js/view/ApplicationViewHome.js"></script> > - <script src="application/js/view/ApplicationViewApps.js"></script> > - <script src="application/js/view/ApplicationViewLog.js"></script> > + > + <script > src="application/js/view/tabs/ApplicationViewHome.js"></script> > + <script > src="application/js/view/tabs/ApplicationViewApps.js"></script> > + <script src="application/js/view/tabs/ApplicationViewLog.js"></script> > > <script src="application/js/view/panels/ErrorPanel.js"></script> > <script src="application/js/view/panels/Jndi.js"></script> > @@ -40,6 +41,10 @@ > <script src="application/js/view/panels/Saved.js"></script> > <script src="application/js/view/panels/Console.js"></script> > <script src="application/js/view/panels/Applications.js"></script> > + <script src="application/js/view/panels/ApplicationsLog.js"></script> > + <script src="application/js/view/panels/Mdbs.js"></script> > + <script src="application/js/view/panels/WebServices.js"></script> > + > > </head> > <body></body> > > >
