Move static pages content in their own file
This commit is contained in:
@@ -7,7 +7,6 @@ define([
|
||||
'/common/common-realtime.js',
|
||||
'/customize/application_config.js',
|
||||
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
||||
'/customize/pages.js',
|
||||
'/poll/render.js',
|
||||
'/poll/export.js',
|
||||
'/common/diffMarked.js',
|
||||
@@ -37,7 +36,6 @@ define([
|
||||
CommonRealtime,
|
||||
AppConfig,
|
||||
Listmap,
|
||||
Pages,
|
||||
Renderer,
|
||||
Exporter,
|
||||
DiffMd,
|
||||
@@ -1223,13 +1221,63 @@ define([
|
||||
}
|
||||
};
|
||||
|
||||
var initialContent = function () {
|
||||
return [
|
||||
h('div#cp-toolbar.cp-toolbar-container'),
|
||||
h('div#cp-app-poll-content', [
|
||||
h('div#cp-app-poll-form', [
|
||||
h('div.cp-app-poll-realtime', [
|
||||
h('br'),
|
||||
h('div', [
|
||||
h('textarea#cp-app-poll-description', {
|
||||
rows: "5",
|
||||
cols: "50",
|
||||
placeholder: Messages.poll_descriptionHint,
|
||||
disabled: true
|
||||
}),
|
||||
h('div#cp-app-poll-description-published'),
|
||||
h('br')
|
||||
]),
|
||||
h('div#cp-app-poll-table-container', [
|
||||
h('div#cp-app-poll-table-scroll', [h('table')]),
|
||||
h('button#cp-app-poll-create-user.btn.btn-secondary', {
|
||||
title: Messages.poll_create_user
|
||||
}, Messages.poll_commit),
|
||||
h('button#cp-app-poll-create-option.btn.btn-secondary', {
|
||||
title: Messages.poll_create_option
|
||||
}, h('span.fa.fa-plus')),
|
||||
]),
|
||||
h('div#cp-app-poll-comments', [
|
||||
h('h2#cp-app-poll-comments-add-title', Messages.poll_comment_add),
|
||||
h('div#cp-app-poll-comments-add', [
|
||||
h('input.cp-app-poll-comments-add-name', {
|
||||
type: 'text',
|
||||
placeholder: Messages.anonymous
|
||||
}),
|
||||
h('textarea.cp-app-poll-comments-add-msg', {
|
||||
placeholder: Messages.poll_comment_placeholder
|
||||
}),
|
||||
h('button.cp-app-poll-comments-add-submit.btn.btn-secondary',
|
||||
Messages.poll_comment_submit),
|
||||
h('button.cp-app-poll-comments-add-cancel.btn.btn-secondary',
|
||||
Messages.cancel)
|
||||
]),
|
||||
h('h2#cp-app-poll-comments-list-title', Messages.poll_comment_list),
|
||||
h('div#cp-app-poll-comments-list')
|
||||
]),
|
||||
h('div#cp-app-poll-nocomments', Messages.poll_comment_disabled)
|
||||
])
|
||||
])
|
||||
])
|
||||
];
|
||||
};
|
||||
|
||||
var main = function () {
|
||||
|
||||
nThen(function (waitFor) {
|
||||
$(waitFor(function () {
|
||||
UI.addLoadingScreen();
|
||||
var $div = $('<div>').append(Pages['/poll/']());
|
||||
var $div = $('<div>').append(initialContent());
|
||||
$('body').append($div.html());
|
||||
}));
|
||||
SFCommon.create(waitFor(function (c) { APP.common = common = c; }));
|
||||
|
||||
Reference in New Issue
Block a user