Browse Source

Fix bug where account switching failed to actually switch accounts

Skylar Ittner 3 months ago
parent
commit
d006684147
4 changed files with 58 additions and 58 deletions
  1. 50
    50
      nbproject/build.xml
  2. 4
    4
      nbproject/project.properties
  3. 3
    3
      www/js/accounts.js
  4. 1
    1
      www/pages/accounts.html

+ 50
- 50
nbproject/build.xml View File

@@ -46,7 +46,7 @@ made subject to such option by the copyright holder.
46 46
 <!--
47 47
     Generated file; DO NOT EDIT.
48 48
 -->
49
-<project name="BusinessMobile" basedir="..">
49
+<project name="NetsymsMobile" basedir="..">
50 50
     <property file="nbproject/configs/${config}.properties" />
51 51
 
52 52
     <scriptdef name="checkVersion" language="javascript">
@@ -59,7 +59,7 @@ made subject to such option by the copyright holder.
59 59
        }
60 60
      ]]>
61 61
     </scriptdef>
62
-    
62
+
63 63
     <scriptdef name="forDevice" language="javascript">
64 64
      <![CDATA[
65 65
        var dev = project.getProperty("device");
@@ -77,7 +77,7 @@ made subject to such option by the copyright holder.
77 77
             </or>
78 78
         </condition>
79 79
     </target>
80
-    
80
+
81 81
     <target name="upgrade-to-cordova-project" depends="check-cordova-project,check-cordova-version" unless="cordova.project">
82 82
         <echo level="info" message="${cordova.command} -d create ${java.io.tmpdir}/nb_temp_project com.coolappz.${project.name} ${project.name}" />
83 83
         <delete dir="${java.io.tmpdir}/nb_temp_project"/>
@@ -85,8 +85,8 @@ made subject to such option by the copyright holder.
85 85
             <env key="${cordova.path.key}" path="${cordova.path.value}:${android.sdk.home}/tools:${android.sdk.home}/platform-tools:${jdk.home}/bin:${ant.home}/bin:${jdk.home}/bin"/>
86 86
             <env key="JAVA_HOME" path="${jdk.home}"/>
87 87
             <arg value="-d"/>
88
-            <arg value="create"/>   
89
-            <arg value="${java.io.tmpdir}/nb_temp_project"/>   
88
+            <arg value="create"/>
89
+            <arg value="${java.io.tmpdir}/nb_temp_project"/>
90 90
             <arg value="com.coolappz.${project.name}"/>
91 91
             <arg value="${project.name}" />
92 92
         </exec>
@@ -106,8 +106,8 @@ made subject to such option by the copyright holder.
106 106
             <env key="${cordova.path.key}" path="${cordova.path.value}:${android.sdk.home}/tools:${android.sdk.home}/platform-tools:${jdk.home}/bin:${ant.home}/bin:${jdk.home}/bin"/>
107 107
             <env key="JAVA_HOME" path="${jdk.home}"/>
108 108
             <arg value="-d"/>
109
-            <arg value="create"/>   
110
-            <arg value="www_nb_temp"/>   
109
+            <arg value="create"/>
110
+            <arg value="www_nb_temp"/>
111 111
             <arg value="com.coolappz.${project.name}"/>
112 112
             <arg value="${project.name}" />
113 113
         </exec>
@@ -117,26 +117,26 @@ made subject to such option by the copyright holder.
117 117
         <delete dir="www_nb_temp"/>
118 118
         <delete file="www/config.xml"/>
119 119
     </target>
120
-    
121
-    <taskdef 
122
-        classname="org.netbeans.modules.cordova.updatetask.ReadConfigTask" 
120
+
121
+    <taskdef
122
+        classname="org.netbeans.modules.cordova.updatetask.ReadConfigTask"
123 123
         classpath="${update.task.jar}"
124 124
         name="readconfig"/>
125 125
 
126
-    <taskdef 
127
-        classname="org.netbeans.modules.cordova.updatetask.PluginTask" 
126
+    <taskdef
127
+        classname="org.netbeans.modules.cordova.updatetask.PluginTask"
128 128
         classpath="${update.task.jar}"
129 129
         name="plugintask"/>
130
-    
131
-        
130
+
131
+
132 132
     <target name="check-cordova-version">
133
-        <property environment="env"/>        
133
+        <property environment="env"/>
134 134
         <checkVersion first="${cordova.version}" property="cordova.ver.3"/>
135 135
         <fail message="Cordova version 3 or greater required." unless="cordova.ver.3"/>
136 136
         <readconfig/>
137 137
         <forDevice/>
138 138
     </target>
139
-    
139
+
140 140
     <target name="check-android-template">
141 141
         <available file="platforms/android" property="android.generated.exists"/>
142 142
     </target>
@@ -144,27 +144,27 @@ made subject to such option by the copyright holder.
144 144
     <target name="check-ios-template">
145 145
         <available file="platforms/ios" property="ios.generated.exists"/>
146 146
     </target>
147
-    
147
+
148 148
     <target name="create-android" depends="check-android-template,check-cordova-version,upgrade-to-cordova-project" unless="android.generated.exists">
149 149
         <echo level="info" message="${cordova.command} -d platform add android"/>
150 150
         <exec executable="${cordova.command}" resolveexecutable="true" searchpath="true" failonerror="true">
151 151
             <env key="${cordova.path.key}" path="${cordova.path.value}:${android.sdk.home}/tools:${android.sdk.home}/platform-tools:${jdk.home}/bin:${ant.home}/bin:${jdk.home}/bin"/>
152 152
             <env key="JAVA_HOME" path="${jdk.home}"/>
153 153
             <arg value="-d"/>
154
-            <arg value="platform"/>   
155
-            <arg value="add"/>   
154
+            <arg value="platform"/>
155
+            <arg value="add"/>
156 156
             <arg value="android"/>
157 157
         </exec>
158 158
     </target>
159
-    
159
+
160 160
     <target name="create-ios" depends="check-ios-template,check-cordova-version,upgrade-to-cordova-project" unless="ios.generated.exists">
161 161
         <echo level="info" message="${cordova.command} -d platform add ios"/>
162 162
         <exec executable="${cordova.command}" resolveexecutable="true" searchpath="true" dir="." failonerror="true">
163 163
             <env key="${cordova.path.key}" path="${cordova.path.value}:${android.sdk.home}/tools:${android.sdk.home}/platform-tools:${jdk.home}/bin:${ant.home}/bin:${jdk.home}/bin"/>
164 164
             <env key="JAVA_HOME" path="${jdk.home}"/>
165 165
             <arg value="-d"/>
166
-            <arg value="platform"/>   
167
-            <arg value="add"/>   
166
+            <arg value="platform"/>
167
+            <arg value="add"/>
168 168
             <arg value="ios"/>
169 169
         </exec>
170 170
     </target>
@@ -178,23 +178,23 @@ made subject to such option by the copyright holder.
178 178
         <exec executable="xcodebuild" dir="platforms/ios" failonerror="true">
179 179
             <arg value="-project"/>
180 180
             <arg value="${project.name}.xcodeproj"/>
181
-            <arg value="ARCHS=${ios.build.arch}"/>   
181
+            <arg value="ARCHS=${ios.build.arch}"/>
182 182
             <arg value="-target"/>
183 183
             <arg value="${project.name}"/>
184
-            <arg value="-configuration"/> 
184
+            <arg value="-configuration"/>
185 185
             <arg value="Release"/>
186
-            <arg value="-sdk"/>   
186
+            <arg value="-sdk"/>
187 187
             <arg value="${ios.build.sdk}" />
188 188
             <arg value="build"/>
189 189
             <arg value="CONFIGURATION_BUILD_DIR=${path}"/>
190 190
         </exec>
191 191
     </target>
192
-    
192
+
193 193
     <target name="build-ios-ipa" if="build.for.device">
194 194
         <exec executable="xcrun" dir="platforms/ios/build" failonerror="true">
195 195
             <env key="CODESIGN_ALLOCATE" value="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate" />
196 196
             <arg value="-sdk"/>
197
-            <arg value="${ios.build.sdk}" />            
197
+            <arg value="${ios.build.sdk}" />
198 198
             <arg value="PackageApplication"/>
199 199
             <arg value="-v"/>
200 200
             <arg value="${project.name}.app"/>
@@ -208,15 +208,15 @@ made subject to such option by the copyright holder.
208 208
         <available file="${basedir}/platforms/ios/build/${project.name}.ipa" property="ipa.found"/>
209 209
         <fail unless="ipa.found" message="PackageApplication failed."/>
210 210
     </target>
211
-         
211
+
212 212
 
213 213
     <target name="sim-ios" depends="build-ios,ios-run-device,ios-run-simulator">
214 214
     </target>
215
-    
215
+
216 216
     <target name="ios-run-device" if="build.for.device">
217 217
         <echo>
218
-            Install "${basedir}/platforms/ios/build/${project.name}.ipa" through iTunes and run it. 
219
-        </echo> 
218
+            Install "${basedir}/platforms/ios/build/${project.name}.ipa" through iTunes and run it.
219
+        </echo>
220 220
         <exec executable="open" failonerror="true">
221 221
             <arg value="${basedir}/platforms/ios/build/${project.name}.ipa"/>
222 222
         </exec>
@@ -228,13 +228,13 @@ made subject to such option by the copyright holder.
228 228
         </exec>
229 229
         <exec executable="${ios.sim.exec}" dir="platforms/ios/build">
230 230
             <arg line="launch ${project.name}.app ${ios.device.args} --exit"/>
231
-        </exec> 
231
+        </exec>
232 232
     </target>
233
-    
233
+
234 234
     <target name="update-plugins">
235 235
         <plugintask/>
236
-    </target>    
237
-    
236
+    </target>
237
+
238 238
     <target name="update-android">
239 239
         <echo level="info" message="${cordova.command} prepare android"/>
240 240
 
@@ -244,9 +244,9 @@ made subject to such option by the copyright holder.
244 244
             <arg value="prepare"/>
245 245
             <arg value="android"/>
246 246
         </exec>
247
-    </target>    
248
-        
249
-                           
247
+    </target>
248
+
249
+
250 250
     <target name="update-ios">
251 251
         <echo level="info" message="${cordova.command} prepare ios"/>
252 252
         <exec executable="${cordova.command}" resolveexecutable="true" searchpath="true" failonerror="true">
@@ -255,21 +255,21 @@ made subject to such option by the copyright holder.
255 255
             <arg value="prepare"/>
256 256
             <arg value="ios"/>
257 257
         </exec>
258
-    </target>    
259
-    
260
-    <target name="rebuild-android" depends="clean-android,build-android"/>      
261
-    
258
+    </target>
259
+
260
+    <target name="rebuild-android" depends="clean-android,build-android"/>
261
+
262 262
     <target name="build-android" depends="create-android,update-plugins">
263 263
         <echo level="info" message="${cordova.command} -d build android"/>
264 264
         <exec executable="${cordova.command}" resolveexecutable="true" searchpath="true" failonerror="true">
265 265
             <env key="${cordova.path.key}" path="${cordova.path.value}:${android.sdk.home}/tools:${android.sdk.home}/platform-tools:${jdk.home}/bin:${ant.home}/bin:${jdk.home}/bin"/>
266 266
             <env key="JAVA_HOME" path="${jdk.home}"/>
267
-            <arg value="-d"/>   
268
-            <arg value="build"/>   
269
-            <arg value="android"/>   
267
+            <arg value="-d"/>
268
+            <arg value="build"/>
269
+            <arg value="android"/>
270 270
         </exec>
271
-    </target>    
272
-    
271
+    </target>
272
+
273 273
     <target name="sim-android" depends="create-android,update-plugins">
274 274
         <echo level="info" message="${cordova.command} -d ${android.target.device.arg} android"/>
275 275
         <exec executable="${cordova.command}" resolveexecutable="true" searchpath="true" failonerror="true">
@@ -277,16 +277,16 @@ made subject to such option by the copyright holder.
277 277
             <env key="JAVA_HOME" path="${jdk.home}"/>
278 278
             <arg value="-d"/>
279 279
             <arg value="${android.target.device.arg}"/>
280
-            <arg value="android"/>   
280
+            <arg value="android"/>
281 281
         </exec>
282 282
     </target>
283
-    
283
+
284 284
     <target name="clean-android" depends="check-android-template" if="android.generated.exists">
285 285
         <exec executable="./gradlew" dir="platforms/android">
286 286
             <arg value="clean" />
287 287
         </exec>
288 288
     </target>
289
-    
289
+
290 290
     <target name="clean-ios" depends="check-ios-template" if="ios.generated.exists">
291 291
         <exec executable="platforms/ios/cordova/clean" />
292 292
     </target>

+ 4
- 4
nbproject/project.properties View File

@@ -1,8 +1,8 @@
1 1
 auxiliary.org-netbeans-modules-cordova.cordova_5f_build_5f_script_5f_version=52
2 2
 auxiliary.org-netbeans-modules-cordova.phonegap=false
3
-file.reference.BusinessMobile-test=test
4
-file.reference.BusinessMobile-www=www
3
+file.reference.NetsymsMobile-test=test
4
+file.reference.NetsymsMobile-www=www
5 5
 files.encoding=UTF-8
6 6
 project.licensePath=nbproject/mplheader.txt
7
-site.root.folder=${file.reference.BusinessMobile-www}
8
-test.folder=${file.reference.BusinessMobile-test}
7
+site.root.folder=${file.reference.NetsymsMobile-www}
8
+test.folder=${file.reference.NetsymsMobile-test}

+ 3
- 3
www/js/accounts.js View File

@@ -49,14 +49,14 @@ function recoveraccounts(callback) {
49 49
 /**
50 50
  * Switch to a different account.
51 51
  * @param {int} account The selected account index from localStorage.getItem('accounts')
52
- * @param {boolean} showmsg Whether to show the "switched accounts" alert dialog.  Default True.
52
+ * @param {boolean} showmsg [HAS NO EFFECT] Whether to show the "switched accounts" alert dialog.  Default True.
53 53
  * @returns {undefined}
54 54
  */
55 55
 function switchaccount(account, showmsg) {
56 56
     if (typeof showmsg != 'boolean') {
57 57
         showmsg = true;
58 58
     }
59
-    // If there isn't an accounts list yet, this shouldi take us back to the setup
59
+    // If there isn't an accounts list yet, this should take us back to the setup
60 60
     if (!isconfigvalid()) {
61 61
         restartApplication();
62 62
     }
@@ -74,7 +74,7 @@ function switchaccount(account, showmsg) {
74 74
 
75 75
     restartApplication();
76 76
     if (showmsg == true) {
77
-        navigator.notification.alert("Successfully switched accounts.", null, "Switched", 'OK');
77
+        //navigator.notification.alert("Successfully switched accounts.", null, "Switched", 'OK');
78 78
     }
79 79
 }
80 80
 

+ 1
- 1
www/pages/accounts.html View File

@@ -21,7 +21,7 @@
21 21
             <ul id="accountlist">
22 22
                 {{#each accounts}}
23 23
                 <li class="swipeout accountlist-item" data-id="{{id}}">
24
-                    <div class="item-content swipeout-content">
24
+                    <div class="item-content swipeout-content" data-id="{{id}}">
25 25
                         <div class="item-media"><img src="img/accounticons/{{icon}}.svg" width="44"/></div>
26 26
                         <div class="item-inner">
27 27
                             <div class="item-title-row">

Loading…
Cancel
Save