93
|
1 |
SELECT "------------------------------------" AS " ";
|
|
2 |
SELECT "castoragedb_variant - BEGIN" AS " ";
|
|
3 |
|
107
|
4 |
{% for col in range(feat_tree.CaStorageDbSetting.OperatorCollections._value|length) -%}
|
|
5 |
{%- set Name = feat_tree.CaStorageDbSetting.OperatorCollections.Name._value[col] or '' -%}
|
|
6 |
{%- set ShortName = feat_tree.CaStorageDbSetting.OperatorCollections.ShortName._value[col] or '' -%}
|
|
7 |
{%- set TitleName = feat_tree.CaStorageDbSetting.OperatorCollections.TitleName._value[col] or '' -%}
|
|
8 |
{%- set GroupName = feat_tree.CaStorageDbSetting.OperatorCollections.GroupName._value[col] or '' -%}
|
|
9 |
{%- set Locked = feat_tree.CaStorageDbSetting.OperatorCollections.Locked._value[col] or false -%}
|
|
10 |
{%- set IconFileName = ( feat_tree.CaStorageDbSetting.OperatorCollections.Icon.localPath._value[col] or '' ) -%}
|
|
11 |
{%- set IconSkinId = feat_tree.CaStorageDbSetting.OperatorCollections.IconSkinId._value[col] or '' -%}
|
|
12 |
{% if IconSkinId == "" and IconFileName != "" and IconFileName != "dummy" -%}
|
|
13 |
{% set IconFileName = "z:\\private\\20022F35\\customsvg\\" + IconFileName %}
|
|
14 |
{% endif %}
|
|
15 |
INSERT INTO COLLECTION (COLLECTION_NAME, COL_APP_GROUP_NAME, FLAGS {% if TitleName -%}, COL_TITLE_NAME{%- endif %} {% if ShortName -%}, COL_SHORT_NAME{%- endif %}, ICON_FILENAME, ICON_SKIN_ID)
|
|
16 |
VALUES ( '{{Name}}', '{{GroupName}}', {% if Locked -%} 12 {% else %} 8 {%- endif %} {% if TitleName -%}, "{{TitleName}}"{%- endif %} {% if ShortName -%}, "{{ShortName}}"{%- endif %}, "{{IconFileName}}", "{{IconSkinId}}");
|
|
17 |
{% endfor %}
|
|
18 |
|
|
19 |
{% for i in range(feat_tree.CaStorageDbSetting.OperatorURLs._value|length) -%}
|
|
20 |
{% set URLTitle = feat_tree.CaStorageDbSetting.OperatorURLs.OperatorURLTitle._value[i] %}
|
|
21 |
{%- set URLShortTitle = feat_tree.CaStorageDbSetting.OperatorURLs.OperatorURLShortTitle._value[i] or '' -%}
|
|
22 |
{%- set URL = feat_tree.CaStorageDbSetting.OperatorURLs.OperatorURL._value[i] or '' -%}
|
|
23 |
{%- set URLIcon = feat_tree.CaStorageDbSetting.OperatorURLs.OperatorURLIcon.localPath._value[i] or '' -%}
|
|
24 |
{%- set IconSkinId = feat_tree.CaStorageDbSetting.OperatorURLs.IconSkinId._value[i] or '' -%}
|
|
25 |
{% if IconSkinId == "" and URLIcon != "" and URLIcon != "dummy" -%}
|
|
26 |
{% set URLIcon = "z:\\private\\20022F35\\customsvg\\" + URLIcon %}
|
|
27 |
{% endif %}
|
|
28 |
INSERT INTO URL ( URL_TITLE {% if URLShortTitle -%}, URL_SHORT_TITLE{%- endif %}, URL_DEST, ICON_FILENAME, ICON_SKIN_ID )
|
|
29 |
VALUES ('{{URLTitle}}' {% if URLShortTitle -%}, "{{URLShortTitle}}"{%- endif %}, "{{URL}}", "{{URLIcon}}", "{{IconSkinId}}" );
|
|
30 |
{% endfor %}
|
|
31 |
|
|
32 |
{% for index in range(feat_tree.CaStorageDbSetting.OperatorCollectionItems._value|length) -%}
|
|
33 |
{% set Collection = feat_tree.CaStorageDbSetting.OperatorCollections.Name._value[0] %}
|
|
34 |
{%- set Type = feat_tree.CaStorageDbSetting.OperatorCollectionItems.Type._value[index] or '' -%}
|
|
35 |
{%- set Application = feat_tree.CaStorageDbSetting.OperatorCollectionItems.Application._value[index] or '' -%}
|
|
36 |
{%- set OperatorURLTitle = feat_tree.CaStorageDbSetting.OperatorCollectionItems.OperatorURL._value[index] or '' -%}
|
|
37 |
{%- set HomescreenWidget = feat_tree.CaStorageDbSetting.OperatorCollectionItems.HomescreenWidget._value[index] or '' -%}
|
|
38 |
{% if Type == "1" -%} INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME)
|
|
39 |
VALUES ("application", '', {{Application}}, '{{Collection}}' );{%- endif %}
|
|
40 |
{% if Type == "3" -%}
|
|
41 |
{% for i in range(feat_tree.CaStorageDbSetting.OperatorURLs._value|length) if OperatorURLTitle == feat_tree.CaStorageDbSetting.OperatorURLs.OperatorURLTitle._value[i] -%}
|
|
42 |
INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, COLLECTION_NAME)
|
|
43 |
VALUES ( "url", '{{OperatorURLTitle}}', '{{Collection}}' );
|
|
44 |
{% endfor %}
|
|
45 |
{%- endif %}
|
|
46 |
{% if Type == "2" -%} INSERT INTO WIDGET_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ICON_FILENAME, ICON_SKIN_ID, URI, COLLECTION_NAME )
|
|
47 |
VALUES ("widget", '', '', '', "{{HomescreenWidget}}", '{{Collection}}' ); {%- endif %}
|
|
48 |
{% endfor %}
|
|
49 |
|
93
|
50 |
{% for col in range(feat_tree.CaStorageDbSetting.Collections._value|length) -%}
|
|
51 |
{%- set Name = feat_tree.CaStorageDbSetting.Collections.Name._value[col] or '' -%}
|
107
|
52 |
{% set LocalizeNames = feat_tree.CaStorageDbSetting.Collections.LocalizeNames._value[col] or false -%}
|
|
53 |
{%- set ShortName = feat_tree.CaStorageDbSetting.Collections.ShortName._value[col] or '' -%}
|
|
54 |
{%- set TitleName = feat_tree.CaStorageDbSetting.Collections.TitleName._value[col] or '' -%}
|
93
|
55 |
{%- set GroupName = feat_tree.CaStorageDbSetting.Collections.GroupName._value[col] or '' -%}
|
107
|
56 |
{%- set Locked = feat_tree.CaStorageDbSetting.Collections.Locked._value[col] or false -%}
|
|
57 |
{%- set TranslationFile = feat_tree.CaStorageDbSetting.Collections.TranslationFile._value[col]|string|reverse|replace('_','',1)|reverse+'_' or ''-%}
|
|
58 |
{%- set IconFileName = feat_tree.CaStorageDbSetting.Collections.Icon.localPath._value[col] or '' -%}
|
94
|
59 |
{%- set IconSkinId = feat_tree.CaStorageDbSetting.Collections.IconSkinId._value[col] or '' -%}
|
107
|
60 |
{% if IconSkinId == "" and IconFileName != "" and IconFileName != "dummy" -%}
|
|
61 |
{% set IconFileName = "z:\\private\\20022F35\\customsvg\\" + IconFileName %}
|
|
62 |
{% endif %}
|
|
63 |
INSERT INTO COLLECTION (COLLECTION_NAME, COL_APP_GROUP_NAME, FLAGS {% if TitleName -%}, COL_TITLE_NAME{%- endif %}{% if LocalizeNames -%}, TRANSLATION_FILE{%- endif %}{% if ShortName -%}, COL_SHORT_NAME{%- endif %}, ICON_FILENAME, ICON_SKIN_ID)
|
|
64 |
VALUES ( '{{Name}}', '{{GroupName}}', {% if Locked -%} 12 {% else %} 8 {%- endif %} {% if TitleName -%}, "{{TitleName}}"{%- endif %}{% if LocalizeNames -%}, "{{TranslationFile}}"{%- endif %}{% if ShortName -%}, "{{ShortName}}"{%- endif %}, "{{IconFileName}}", "{{IconSkinId}}");
|
|
65 |
{% endfor %}
|
93
|
66 |
|
107
|
67 |
{% for i in range(feat_tree.CaStorageDbSetting.URLs._value|length) -%}
|
|
68 |
{% set URLTitle = feat_tree.CaStorageDbSetting.URLs.URLTitle._value[i] %}
|
|
69 |
{%- set URLShortTitle = feat_tree.CaStorageDbSetting.URLs.URLShortTitle._value[i] or '' -%}
|
|
70 |
{%- set URL = feat_tree.CaStorageDbSetting.URLs.URL._value[i] or '' -%}
|
|
71 |
{%- set URLIcon = feat_tree.CaStorageDbSetting.URLs.URLIcon.localPath._value[i] or '' -%}
|
|
72 |
{%- set IconSkinId = feat_tree.CaStorageDbSetting.URLs.IconSkinId._value[i] or '' -%}
|
|
73 |
{% if IconSkinId == "" and URLIcon != "" and URLIcon != "dummy" -%}
|
|
74 |
{% set URLIcon = "z:\\private\\20022F35\\customsvg\\" + URLIcon %}
|
|
75 |
{% endif %}
|
|
76 |
INSERT INTO URL ( URL_TITLE {% if URLShortTitle -%}, URL_SHORT_TITLE{%- endif %}, URL_DEST, ICON_FILENAME, ICON_SKIN_ID )
|
|
77 |
VALUES ( '{{URLTitle}}' {% if URLShortTitle -%}, "{{URLShortTitle}}"{%- endif %}, "{{URL}}", "{{URLIcon}}", "{{IconSkinId}}" );
|
93
|
78 |
{% endfor %}
|
|
79 |
|
|
80 |
{% for index in range(feat_tree.CaStorageDbSetting.Items._value|length) -%}
|
|
81 |
{%- set Type = feat_tree.CaStorageDbSetting.Items.Type._value[index] or '' -%}
|
107
|
82 |
{%- set Application = feat_tree.CaStorageDbSetting.Items.Application._value[index] or '' -%}
|
|
83 |
{%- set URLTitle = feat_tree.CaStorageDbSetting.Items.URL._value[index] or '' -%}
|
|
84 |
{%- set HomescreenWidget = feat_tree.CaStorageDbSetting.Items.HomescreenWidget._value[index] or '' -%}
|
|
85 |
{%- set Collection = feat_tree.CaStorageDbSetting.Items.ColName._value[index] or '' -%}
|
|
86 |
{% if Type == "1" -%} INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME)
|
|
87 |
VALUES ("application", '', {{Application}}, '{{Collection}}' );{%- endif %}
|
|
88 |
{% if Type == "3" -%}
|
|
89 |
{% for i in range(feat_tree.CaStorageDbSetting.URLs._value|length) if URLTitle == feat_tree.CaStorageDbSetting.URLs.URLTitle._value[i] -%}
|
|
90 |
INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, COLLECTION_NAME)
|
|
91 |
VALUES ( "url", '{{URLTitle}}', '{{Collection}}' );
|
|
92 |
{% endfor %}
|
|
93 |
{%- endif %}
|
|
94 |
{% if Type == "2" -%} INSERT INTO WIDGET_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ICON_FILENAME, ICON_SKIN_ID, URI, COLLECTION_NAME )
|
|
95 |
VALUES ("widget", '{{HomescreenWidget}}', '', '', "{{HomescreenWidget}}", '{{Collection}}' ); {%- endif %}
|
93
|
96 |
{% endfor %}
|
|
97 |
|
|
98 |
SELECT "castoragedb_variant - END" AS " ";
|
|
99 |
SELECT "------------------------------------" AS " ";
|
|
100 |
|