File tree Expand file tree Collapse file tree 7 files changed +687
-583
lines changed Expand file tree Collapse file tree 7 files changed +687
-583
lines changed Original file line number Diff line number Diff line change 1+ WEB-INF /appengine-generated /
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <appengine-web-app xmlns =" http://appengine.google.com/ns/1.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3- xsi:schemaLocation=" http://appengine.google.com/ns/1.0 http://googleappengine.googlecode.com/svn/branches/1.2.1/java/docs/appengine-web.xsd" >
2+ <appengine-web-app xmlns =" http://appengine.google.com/ns/1.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://appengine.google.com/ns/1.0 http://googleappengine.googlecode.com/svn/branches/1.2.1/java/docs/appengine-web.xsd" >
43 <!-- <application>cropontology-curationtool</application>-->
54 <application >cropontology-curationtool</application >
65 <version >1</version >
76 <public-root >/public</public-root >
87 <sessions-enabled >true</sessions-enabled >
98 <threadsafe >true</threadsafe >
9+ <url-stream-handler >urlfetch</url-stream-handler >
10+ <runtime >java8</runtime >
11+
12+ <!-- Commented on pull request #65 -->
13+ <!-- 2018-09-11 -->
14+ <!--
1015 <automatic-scaling>
1116 <max-concurrent-requests>50</max-concurrent-requests>
1217 </automatic-scaling>
18+ -->
1319</appengine-web-app >
Original file line number Diff line number Diff line change 1+ /**
2+ * Common functions
3+ **/
4+ var languages = require ( "./languages.js" ) ;
5+
6+ /**
7+ * Remove a specific value from a given array
8+ * @param array array The array to clean
9+ * @param value string The value to remove
10+ * @return array The cleaned array
11+ **/
12+ exports . array_clean = function ( array , value ) {
13+ return jQuery . grep ( array , function ( val ) {
14+ return val != value ;
15+ } ) ;
16+ } ;
17+
18+ /**
19+ * Replace a specific value from a given object
20+ * @param array array The array to clean
21+ * @param value string The value to remove
22+ * @return array The cleaned array
23+ **/
24+ exports . object_key_replace = function ( search , replace , object ) {
25+ var new_obj = { } ;
26+
27+ if ( object . toString ( ) . indexOf ( "{" ) > 0 ) {
28+ object = object . getValue ( ) ;
29+ }
30+
31+ var obj = JSON . parse ( object ) ;
32+ for ( var k in obj ) {
33+ if ( k == "undefined" ) {
34+ switch ( replace ) {
35+ case null : obj = obj [ 'undefined' ] ; break ;
36+ case "" : obj [ languages . default ] = obj [ 'undefined' ] ; break ;
37+ }
38+ }
39+ }
40+ delete obj [ 'undefined' ] ;
41+ log ( JSON . stringify ( obj ) ) ;
42+ return JSON . stringify ( obj ) ;
43+ } ;
You can’t perform that action at this time.
0 commit comments