dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25465
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12642: Apps. Removed the app store paged for now and moved the app upload form into app management screen.
------------------------------------------------------------
revno: 12642
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-14 17:10:19 +0200
message:
Apps. Removed the app store paged for now and moved the app upload form into app management screen.
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/getApps.vm
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/index.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/javascript/uploadApp.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/menu.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java 2013-09-26 18:17:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java 2013-10-14 15:10:19 +0000
@@ -71,6 +71,13 @@
return appBaseUrl;
}
+ private String appStoreUrl;
+
+ public String getAppStoreUrl()
+ {
+ return appStoreUrl;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -82,6 +89,8 @@
appList = appManager.getInstalledApps();
appBaseUrl = appManager.getAppBaseUrl();
+
+ appStoreUrl = appManager.getAppStoreUrl();
return SUCCESS;
}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java 2013-09-26 17:20:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppStoreAction.java 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
-package org.hisp.dhis.appmanager.action;
-
-/*
- * Copyright (c) 2004-2013, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hisp.dhis.appmanager.AppManager;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Saptarshi Purkayastha
- */
-public class AppStoreAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- @Autowired
- private AppManager appManager;
-
- // -------------------------------------------------------------------------
- // Input & Output
- // -------------------------------------------------------------------------
-
- private String appStoreUrl;
-
- public String getAppStoreUrl()
- {
- return appStoreUrl;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- appStoreUrl = appManager.getAppStoreUrl();
-
- return SUCCESS;
- }
-}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/struts.xml 2013-09-29 20:10:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/struts.xml 2013-10-14 15:10:19 +0000
@@ -18,6 +18,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-appmanager/index.vm</param>
<param name="menu">/dhis-web-maintenance-appmanager/menu.vm</param>
+ <param name="javascripts">javascript/jquery.form.js,javascript/uploadApp.js</param>
</action>
<action name="addApp" class="org.hisp.dhis.appmanager.action.AddAppAction">
@@ -35,14 +36,6 @@
<param name="javascripts">javascript/jquery.form.js</param>
</action>
- <action name="appStore" class="org.hisp.dhis.appmanager.action.AppStoreAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-appmanager/getApps.vm</param>
- <param name="menu">/dhis-web-maintenance-appmanager/menu.vm</param>
- <param name="javascripts">javascript/jquery.form.js,javascript/uploadApp.js</param>
- <param name="requiredAuthorities">F_SYSTEM_SETTING</param>
- </action>
-
<action name="appSettings" class="org.hisp.dhis.appmanager.action.AppSettingsAction">
<result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<result name="getSuccess" type="velocity">/main.vm</result>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/getApps.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/getApps.vm 2013-08-16 12:29:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/getApps.vm 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-<style type="text/css">
-#uploadArea {
- border: 1px solid #ccc;
- border-radius: 3px;
- padding: 10px;
- width: 440px;
- margin-bottom: 30px;
-}
-
-#progressbar {
- width: 460px;
- margin-bottom: 30px;
-}
-</style>
-
-<div>
- <h3>$i18n.getString( "appmanager_app_store" ) #*openHelp( "appManager" )*#</h3>
- <div id="uploadArea">
- <form id="uploadPackageForm" enctype="multipart/form-data" method="post">
- <span style="margin-right: 30px">$i18n.getString( "appmanager_upload_app_package" ):</span><input type="file" id="upload" name="upload" accept="application/zip,.zip" />
- </form>
- </div>
- <div id="progressbar"></div>
-</div>
-#if( $!appStoreUrl )
-<iframe src="$appStoreUrl" seamless="true" style="width: 100%; height: 500px; border: none;"></iframe>
-#end
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/index.vm 2013-09-29 20:10:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/index.vm 2013-10-14 15:10:19 +0000
@@ -1,5 +1,42 @@
+<style type="text/css">
+#uploadArea {
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ padding: 10px;
+ width: 440px;
+ margin-bottom: 30px;
+}
+
+#progressbar {
+ width: 460px;
+ margin-bottom: 30px;
+}
+
+#appStoreLink {
+ font-size: 15px;
+ color: #777;
+ border-bottom: 1px solid #ccc;
+ padding-bottom: 10px;
+ width: auto;
+ max-width: 460px;
+}
+</style>
+
<h3>$i18n.getString( "dhis-web-maintenance-appmanager" ) #*openHelp( "appManager" )*#</h3>
+<div>
+<div id="uploadArea">
+ <form id="uploadPackageForm" enctype="multipart/form-data" method="post">
+ <span style="margin-right: 30px">$i18n.getString( "appmanager_upload_app_package" ):</span><input type="file" id="upload" name="upload" accept="application/zip,.zip" />
+ </form>
+</div>
+<div id="progressbar"></div>
+</div>
+
+#if( $!appStoreUrl )
+<div id="appStoreLink">Look for more apps in the <a href="${appStoreUrl}" target="_blank">app store</a></div>
+#end
+
<ul class="introList">
#if( $appList.isEmpty() )
<li style="margin-left: 15px; margin-top: 6px;">$i18n.getString( "appmanager_you_have_no_apps_installed" )</li>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/javascript/uploadApp.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/javascript/uploadApp.js 2013-08-30 07:56:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/javascript/uploadApp.js 2013-10-14 15:10:19 +0000
@@ -23,6 +23,8 @@
}, 4000);
setHeaderDelayMessage(JSON.parse(xhr.responseText).message);
jQuery("#uploadPackageForm")[0].reset();
+
+ window.location.reload();
}
};
xhr.open('post', 'addApp.action', true);
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/menu.vm 2013-09-29 20:10:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/dhis-web-maintenance-appmanager/menu.vm 2013-10-14 15:10:19 +0000
@@ -2,7 +2,6 @@
<ul>
<li><a href="appList.action">$i18n.getString( "appmanager_list_app" )</a></li>
#if( $auth.hasAccess( "dhis-web-maintenance-appmanager", "appSettings" ) )
- <li><a href="appStore.action">$i18n.getString( "appmanager_app_store" )</a></li>
<li><a href="appSettings.action">$i18n.getString( "appmanager_settings" )</a></li>
#end
</ul>