~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to modules/twitter-form-edit.twig

  • Committer: Dan Garner
  • Date: 2015-08-11 09:29:02 UTC
  • mto: This revision was merged to the branch mainline in revision 453.
  • Revision ID: git-v1:a86fb4369b7395c13367577d23b14c0ab4528c1a
Transitions fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
    ".effect-controls": { "display": "block" },
96
96
    ".background-color-group": { "display": "block" }
97
97
    }
98
 
    },{
99
 
    "field": "useDuration",
100
 
    "trigger": "init",
101
 
    "value": false,
102
 
    "operation": "is:checked",
103
 
    "actions": {
104
 
    ".duration-fields": { "display": "none" }
105
 
    }
106
 
    },{
107
 
    "field": "useDuration",
108
 
    "trigger": "change",
109
 
    "value": false,
110
 
    "operation": "is:checked",
111
 
    "actions": {
112
 
    ".duration-fields": { "display": "none" }
113
 
    }
114
 
    },{
115
 
    "field": "useDuration",
116
 
    "trigger": "init",
117
 
    "value": true,
118
 
    "operation": "is:checked",
119
 
    "actions": {
120
 
    ".duration-fields": { "display": "block" }
121
 
    }
122
 
    },{
123
 
    "field": "useDuration",
124
 
    "trigger": "change",
125
 
    "value": true,
126
 
    "operation": "is:checked",
127
 
    "actions": {
128
 
    ".duration-fields": { "display": "block" }
129
 
    }
130
98
    }]
131
99
{% endblock %}
132
100
 
135
103
        <div class="col-md-12">
136
104
                <ul class="nav nav-tabs" role="tablist">
137
105
                <li class="active"><a href="#general" role="tab" data-toggle="tab"><span>{% trans "General" %}</span></a></li>
138
 
                <li><a href="#template" role="tab" data-toggle="tab" data-enlarge="1"><span>{% trans "Apperance" %}</span></a></li>
 
106
                <li><a href="#template" role="tab" data-toggle="tab"><span>{% trans "Apperance" %}</span></a></li>
139
107
                <li><a href="#effectTab" role="tab" data-toggle="tab"><span>{% trans "Effect" %}</span></a></li>
140
108
                <li><a href="#advanced" role="tab" data-toggle="tab"><span>{% trans "Advanced" %}</span></a></li>
141
109
            </ul>
143
111
                 <div class="tab-content">
144
112
                    <div class="tab-pane active" id="general">
145
113
                        {% set title %}{% trans "Name" %}{% endset %}
146
 
                        {% set helpText %}{% trans "An optional name for this widget" %}{% endset %}
147
 
                        {{ forms.input("name", title, module.getOption("name"), helpText) }}
148
 
 
149
 
                        {% set title %}{% trans "Set a duration?" %}{% endset %}
150
 
                        {% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %}
151
 
                        {{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }}
 
114
                        {% set helpText %}{% trans "An optional name for this media" %}{% endset %}
 
115
                        {{ forms.text("name", title, module.getOption("name"), helpText) }}
152
116
 
153
117
                        {% set title %}{% trans "Duration" %}{% endset %}
154
118
                        {% set helpText %}{% trans "The duration in seconds this should be displayed" %}{% endset %}
155
 
                        {{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }}
 
119
                        {{ forms.number("duration", title, module.getDuration(), helpText, "", "required") }}
156
120
 
157
121
                        {% set title %}{% trans "Search Term" %}{% endset %}
158
122
                        {% set helpText %}{% trans "Search term. You can test your search term in the twitter.com search box first." %}{% endset %}
159
 
                        {{ forms.input("searchTerm", title, module.getOption("searchTerm"), helpText, "", "required") }}
 
123
                        {{ forms.text("searchTerm", title, module.getOption("searchTerm"), helpText, "", "required") }}
160
124
 
161
125
                        {% set title %}{% trans "Type" %}{% endset %}
162
126
                        {% set helpText %}{% trans "Recent shows only the most recent tweets, Popular the most popular and Mixed includes both popular and recent results." %}{% endset %}
175
139
                        {{ forms.number("tweetDistance", title, module.getOption("tweetDistance"), helpText) }}
176
140
 
177
141
                        {% set title %}{% trans "Count" %}{% endset %}
178
 
                        {% set helpText %}{% trans "The number of Tweets to return (default = 15)." %}{% endset %}
 
142
                        {% set helpText %}{% trans "The number of Tweets to return." %}{% endset %}
179
143
                        {{ forms.number("tweetCount", title, module.getOption("tweetCount"), helpText) }}
180
 
                        
181
 
                        {% set title %}{% trans "Tweets Per Page" %}{% endset %}
182
 
                        {% set helpText %}{% trans "The number of Tweets to show per page (default = 5)." %}{% endset %}
183
 
                        {{ forms.number("itemsPerPage", title, module.getOption("itemsPerPage"), helpText) }}
184
144
                    </div>
185
145
 
186
146
                    <div class="tab-pane" id="template">
187
147
                        {% set title %}{% trans "Template" %}{% endset %}
188
148
                        {% set helpText %}{% trans "Select the template you would like to apply. This can be overridden using the check box below." %}{% endset %}
189
 
                        {{ forms.dropdown("templateId", "single", title, module.getOption("templateId"), module.templatesAvailable(), "id", "value", helptext, "template-selector-control selectPicker selectPickerWithImage", null, null, null, null, null, baseUrl, "image") }}
 
149
                        {{ forms.dropdown("templateId", "single", title, module.getOption("templateId"), module.templatesAvailable(), "id", "value", helptext, "template-selector-control") }}
190
150
 
191
151
                        {% set title %}{% trans "Override the template?" %}{% endset %}
192
152
                        {% set helpText %}{% trans "Tick if you would like to override the template." %}{% endset %}
193
153
                        {{ forms.checkbox("overrideTemplate", title, module.getOption("overrideTemplate", 0), helpText) }}
194
154
 
195
 
                        {% set title %}{% trans "Original Width" %}{% endset %}
196
 
                        {% set helpText %}{% trans "This is the intended width of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %}
197
 
                        {{ forms.number("widgetOriginalWidth", title, module.getOption("widgetOriginalWidth", undefined), helpText, "template-override-controls", "", "number") }}
198
 
 
199
 
                        {% set title %}{% trans "Original Height" %}{% endset %}
200
 
                        {% set helpText %}{% trans "This is the intended height of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %}
201
 
                        {{ forms.number("widgetOriginalHeight", title, module.getOption("widgetOriginalHeight", undefined), helpText, "template-override-controls", "", "number") }}
202
 
 
203
 
                        {% set title %}{% trans "Original Padding" %}{% endset %}
204
 
                        {% set helpText %}{% trans "This is the intended padding of the template and is used to position the Widget within its region when the template is applied." %}{% endset %}
205
 
                        {{ forms.number("widgetOriginalPadding", title, module.getOption("widgetOriginalPadding", undefined), helpText, "template-override-controls", "", "number") }}
206
 
 
207
 
                        {% set title %}{% trans "Content Type" %}{% endset %}
208
 
                        {% set helpText %}{% trans "This is the intended tweet content type." %}{% endset %}
209
 
                        {% set allTweets %}{% trans "All Tweets" %}{% endset %}
210
 
                        {% set justText %}{% trans "Tweets with text only content" %}{% endset %}
211
 
                        {% set withImages %}{% trans "Tweets with text and image content" %}{% endset %}
212
 
                        {% set options = [
213
 
                        { contenttypeid: 0, type: allTweets },
214
 
                        { contenttypeid: 1, type: justText },
215
 
                        { contenttypeid: 2, type: withImages }
216
 
                        ] %}
217
 
                        {{ forms.dropdown("resultContent", "single", title, module.getOption("resultContent", 0), options, "contenttypeid", "type", helpText,"template-override-controls", "required") }}
218
 
 
219
155
                        {% set helpText %}{% trans "Enter the template. Please note that the background colour has automatically coloured to your layout background colour." %}{% endset %}
220
 
                        {{ forms.textarea("ta_text", "", module.getRawNode("template"), helpText, "template-override-controls", "", 10) }}
 
156
                        {{ forms.textarea("ta_text", "", module.getRawMode("template"), helpText, "template-override-controls", "", 10) }}
221
157
 
222
158
                        {% set title %}{% trans "Optional Stylesheet" %}{% endset %}
223
 
                        {{ forms.textarea("ta_css", "", module.getRawNode("styleSheet"), title, "template-override-controls", "", 10) }}
 
159
                        {{ forms.textarea("ta_css", "", module.getRawMode("styleSheet"), title, "template-override-controls", "", 10) }}
224
160
 
225
161
                    </div>
226
162
 
227
163
                    <div class="tab-pane" id="effectTab">
228
164
                        {% set title %}{% trans "Effect" %}{% endset %}
229
 
                        {% set helpText %}{% trans "Please select the effect that will be used to transition between items." %}{% endset %}
 
165
                        {% set helpText %}{% trans "Please select the effect that will be used to transition between items. If all items should be output, select None. Marquee effects are CPU intensive and may not be suitable for lower power displays." %}{% endset %}
230
166
                        {% set noneOption %}{% trans "None" %}{% endset %}
231
167
                        {% set fade %}{% trans "Fade" %}{% endset %}
232
168
                        {% set fadeout %}{% trans "Fade Out" %}{% endset %}
237
173
                        {% set shuffle %}{% trans "Shuffle" %}{% endset %}
238
174
                        {% set tileSlide %}{% trans "Tile Slide" %}{% endset %}
239
175
                        {% set tileBlind %}{% trans "Tile Blind" %}{% endset %}
 
176
                        {% set marqueeLeft %}{% trans "Marquee Left" %}{% endset %}
 
177
                        {% set marqueeRight %}{% trans "Marquee Right" %}{% endset %}
 
178
                        {% set marqueeUp %}{% trans "Marquee Up" %}{% endset %}
 
179
                        {% set marqueeDown %}{% trans "Marquee Down" %}{% endset %}
240
180
                        {% set options = [
241
 
                        { effectid: "noAnim", effect: noneOption },
 
181
                        { effectid: "none", effect: noneOption },
242
182
                        { effectid: "fade", effect: fade },
243
183
                        { effectid: "fadeout", effect: fadeout},
244
184
                        { effectid: "scrollHorz", effect: scrollHorz},
247
187
                        { effectid: "flipVert", effect: flipVert},
248
188
                        { effectid: "shuffle", effect: shuffle},
249
189
                        { effectid: "tileSlide", effect: tileSlide},
250
 
                        { effectid: "tileBlind", effect: tileBlind}
 
190
                        { effectid: "tileBlind", effect: tileBlind},
 
191
                        { effectid: "marqueeLeft", effect: marqueeLeft},
 
192
                        { effectid: "marqueeRight", effect: marqueeRight},
 
193
                        { effectid: "marqueeUp", effect: marqueeUp},
 
194
                        { effectid: "marqueeDown", effect: marqueeDown}
251
195
                        ] %}
252
196
                        {{ forms.dropdown("effect", "single", title, module.getOption("effect"), options, "effectid", "effect", helpText) }}
253
197
 
254
198
                        {% set title %}{% trans "Speed" %}{% endset %}
255
 
                        {% set helpText %}{% trans "The transition speed of the selected effect in milliseconds (normal = 1000)." %}{% endset %}
 
199
                        {% set helpText %}{% trans "The transition speed of the selected effect in milliseconds (normal = 1000) or the Marquee Speed in a low to high scale (normal = 1)." %}{% endset %}
256
200
                        {{ forms.number("speed", title, module.getOption("speed"), helpText, "effect-controls") }}
257
201
                    </div>
258
202
 
259
203
                    <div class="tab-pane" id="advanced">
260
 
 
261
 
                        {% set title %}{% trans "Duration is per item" %}{% endset %}
262
 
                        {% set helpText %}{% trans "The duration specified is per item otherwise it is per feed." %}{% endset %}
263
 
                        {{ forms.checkbox("durationIsPerItem", title, module.getOption("durationIsPerItem"), helpText) }}
264
 
 
265
204
                        {% set title %}{% trans "Background Colour" %}{% endset %}
266
205
                        {% set helpText %}{% trans "The selected effect works best with a background colour. Optionally add one here." %}{% endset %}
267
 
                        {{ forms.input("backgroundColor", title, module.getOption("backgroundColor"), helpText, "background-color-group") }}
 
206
                        {{ forms.text("backgroundColor", title, module.getOption("backgroundColor"), helpText, "background-color-group") }}
268
207
                        
269
208
                        {% set title %}{% trans "No tweets" %}{% endset %}
270
209
                        {% set helpText %}{% trans "A message to display when there are no tweets returned by the search query" %}{% endset %}
271
 
                        {{ forms.input("noTweetsMessage", title, module.getOption("noTweetsMessage"), helpText) }}
 
210
                        {{ forms.text("noTweetsMessage", title, module.getOption("noTweetsMessage"), helpText) }}
272
211
                        
273
212
                        {% set title %}{% trans "Date Format" %}{% endset %}
274
213
                        {% set helpText %}{% trans "The format to apply to all dates returned by the ticker. In PHP date format: http://uk3.php.net/manual/en/function.date.php" %}{% endset %}
275
 
                        {{ forms.input("dateFormat", title, module.getOption("dateFormat"), helpText) }}
276
 
 
277
 
                        {% set title %}{% trans "Remove Mentions?" %}{% endset %}
278
 
                        {% set helpText %}{% trans "Should mentions (@someone) be removed from the Tweet Text?" %}{% endset %}
279
 
                        {{ forms.checkbox("removeMentions", title, module.GetOption("removeMentions", 0), helpText) }}
280
 
 
281
 
                        {% set title %}{% trans "Remove Hashtags?" %}{% endset %}
282
 
                        {% set helpText %}{% trans "Should Hashtags (#something) be removed from the Tweet Text?" %}{% endset %}
283
 
                        {{ forms.checkbox("removeHashtags", title, module.GetOption("removeHashtags", 0), helpText) }}
 
214
                        {{ forms.text("dateFormat", title, module.getOption("dateFormat"), helpText) }}
284
215
 
285
216
                        {% set title %}{% trans "Remove URLs?" %}{% endset %}
286
 
                        {% set helpText %}{% trans "Should URLs be removed from the Tweet Text? Most URLs do not compliment digital signage." %}{% endset %}
287
 
                        {{ forms.checkbox("removeUrls", title, module.GetOption("removeUrls", 1), helpText) }}
 
217
                        {% set helpText %}{% trans "Should URLs be removed from the Tweet Text. Most URLs do not compliment digital signage." %}{% endset %}
 
218
                        {{ forms.checkbox("removeURLs", title, module.GetOption("removeURLs", 1), helpText) }}
288
219
 
289
220
                        {% set title %}{% trans "Update Interval (mins)" %}{% endset %}
290
221
                        {% set helpText %}{% trans "Please enter the update interval in minutes. This should be kept as high as possible. For example, if the data will only change once per hour this could be set to 60." %}{% endset %}
291
222
                        {{ forms.number("updateInterval", title, module.getOption("updateInterval", 60), helpText, "", "required") }}
292
 
 
293
 
                        {% set title %}{% trans "Optional JavaScript" %}{% endset %}
294
 
                        {{ forms.textarea("javaScript", "", module.getRawNode("javaScript"), title, "", "", 10) }}
295
 
                    </div>
 
223
                    <div>
296
224
                </div>
297
225
            </form>
298
226
        </div>