mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
Simplify client side templates structure of pages style
This commit is contained in:
parent
a61b48252c
commit
406e11a38e
@ -150,25 +150,16 @@ gulp.task('page-styles', function() {
|
||||
// TODO: Process all available styles, not only the default one.
|
||||
var stylePath = config.pageStylesPath + '/default';
|
||||
|
||||
return eventStream.merge(
|
||||
gulp.src(stylePath + '/templates_src/client_side/default/**/*.handlebars')
|
||||
.pipe(handlebars({
|
||||
// Use specific version of Handlebars.js
|
||||
handlebars: handlebarsEngine
|
||||
}))
|
||||
.pipe(wrapHandlebarsTemplate())
|
||||
.pipe(concat('default_app.tpl.js')),
|
||||
gulp.src(stylePath + '/templates_src/client_side/users/**/*.handlebars')
|
||||
.pipe(handlebars({
|
||||
// Use specific version of Handlebars.js
|
||||
handlebars: handlebarsEngine
|
||||
}))
|
||||
.pipe(wrapHandlebarsTemplate())
|
||||
.pipe(concat('users_app.tpl.js'))
|
||||
)
|
||||
.pipe(uglify({preserveComments: 'some'}))
|
||||
.pipe(header(config.compiledTemplatesHeader))
|
||||
.pipe(gulp.dest(stylePath + '/templates_compiled/client_side'));
|
||||
return gulp.src(stylePath + '/templates_src/client_side/**/*.handlebars')
|
||||
.pipe(handlebars({
|
||||
// Use specific version of Handlebars.js
|
||||
handlebars: handlebarsEngine
|
||||
}))
|
||||
.pipe(wrapHandlebarsTemplate())
|
||||
.pipe(concat('templates.js'))
|
||||
.pipe(uglify({preserveComments: 'some'}))
|
||||
.pipe(header(config.compiledTemplatesHeader))
|
||||
.pipe(gulp.dest(stylePath + '/templates_compiled/client_side'));
|
||||
});
|
||||
|
||||
// Generate .pot files based on the sources
|
||||
|
@ -24,7 +24,7 @@
|
||||
Mibew.Views.ThreadsCollection = Mibew.Views.CompositeBase.extend(
|
||||
/** @lends Mibew.Views.ThreadsCollection.prototype */
|
||||
{
|
||||
template: Handlebars.templates['threads_collection'],
|
||||
template: Handlebars.templates['users/threads_collection'],
|
||||
|
||||
/**
|
||||
* Default item view constructor.
|
||||
|
@ -24,7 +24,7 @@
|
||||
Mibew.Views.VisitorsCollection = Mibew.Views.CompositeBase.extend(
|
||||
/** @lends Mibew.Views.VisitorsCollection.prototype */
|
||||
{
|
||||
template: Handlebars.templates['visitors_collection'],
|
||||
template: Handlebars.templates['users/visitors_collection'],
|
||||
|
||||
/**
|
||||
* Default item view constructor.
|
||||
|
@ -28,7 +28,7 @@
|
||||
* Template function
|
||||
* @type Function
|
||||
*/
|
||||
template: Handlebars.templates['agent'],
|
||||
template: Handlebars.templates['users/agent'],
|
||||
|
||||
/**
|
||||
* Name of wrapper tag for an agent view
|
||||
|
@ -28,7 +28,7 @@
|
||||
* Template function
|
||||
* @type Function
|
||||
*/
|
||||
template: Handlebars.templates['no_threads'],
|
||||
template: Handlebars.templates['users/no_threads'],
|
||||
|
||||
/**
|
||||
* View initializer
|
||||
|
@ -28,7 +28,7 @@
|
||||
* Template function
|
||||
* @type Function
|
||||
*/
|
||||
template: Handlebars.templates['no_visitors'],
|
||||
template: Handlebars.templates['users/no_visitors'],
|
||||
|
||||
/**
|
||||
* View initializer
|
||||
|
@ -28,7 +28,7 @@
|
||||
* Template function
|
||||
* @type Function
|
||||
*/
|
||||
template: Handlebars.templates['queued_thread'],
|
||||
template: Handlebars.templates['users/queued_thread'],
|
||||
|
||||
/**
|
||||
* Default item view constructor.
|
||||
|
@ -28,7 +28,7 @@
|
||||
* Template function
|
||||
* @type Function
|
||||
*/
|
||||
template: Handlebars.templates['status_panel'],
|
||||
template: Handlebars.templates['users/status_panel'],
|
||||
|
||||
/**
|
||||
* Map model events to the view methods
|
||||
|
@ -28,7 +28,7 @@
|
||||
* Template function
|
||||
* @type Function
|
||||
*/
|
||||
template: Handlebars.templates['visitor'],
|
||||
template: Handlebars.templates['users/visitor'],
|
||||
|
||||
/**
|
||||
* Default item view constructor.
|
||||
|
@ -9,7 +9,7 @@
|
||||
<script type="text/javascript" src="{{asset "js/libs/handlebars.min.js"}}"></script>
|
||||
|
||||
<!-- Client side templates -->
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script>
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/templates.js"}}"></script>
|
||||
|
||||
<!-- Application files -->
|
||||
<script type="text/javascript" src="{{asset "js/compiled/mibewapi.js"}}"></script>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<script type="text/javascript" src="{{asset "js/libs/handlebars.min.js"}}"></script>
|
||||
|
||||
<!-- Client side templates -->
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script>
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/templates.js"}}"></script>
|
||||
|
||||
<!-- Default application files -->
|
||||
<script type="text/javascript" src="{{asset "js/compiled/mibewapi.js"}}"></script>
|
||||
|
@ -17,8 +17,7 @@
|
||||
<script type="text/javascript" src="{{asset "js/libs/handlebars.min.js"}}"></script>
|
||||
|
||||
<!-- Client side templates -->
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/default_app.tpl.js"}}"></script>
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/users_app.tpl.js"}}"></script>
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/templates_compiled/client_side/templates.js"}}"></script>
|
||||
|
||||
<!-- Application files -->
|
||||
<script type="text/javascript" src="{{asset "js/compiled/mibewapi.js"}}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user