Commit 6dd89f52 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Apply requirecss to platform templates.

parent d86e74bf
define(["jclass", "vispa/common/url", "jquery"], function(JClass, UrlHandler, $) { define([
"jclass",
"vispa/common/url",
"jquery",
"css!styles/login.css"
], function(JClass, UrlHandler, $) {
var Vispa = JClass._extend({ var Vispa = JClass._extend({
......
define(["jclass", "vispa/common/url", "vispa/common/dialog", "jquery"], define([
function(JClass, UrlHandler, Dialog, $) { "jclass",
"vispa/common/url",
"vispa/common/dialog",
"jquery",
"css!styles/password.css"
], function(JClass, UrlHandler, Dialog, $) {
var Vispa = JClass._extend({ var Vispa = JClass._extend({
......
...@@ -15,17 +15,17 @@ define([ ...@@ -15,17 +15,17 @@ define([
"vispa/workspaces", "vispa/workspaces",
"vispa/extensions", "vispa/extensions",
"vispa/preferences", "vispa/preferences",
"vispa/ui" "vispa/ui",
"vendor/jquery/plugins/logger/jquery.logger",
"vendor/jquery/plugins/hotkeys/jquery.hotkeys",
"vendor/jquery/plugins/shortcuts/jquery.shortcuts",
"vendor/jquery/plugins/localesorter/jquery.localesorter",
"vendor/jquery/plugins/polling/jquery.polling",
"vendor/jquery/plugins/lightbox/jquery.lightbox",
"vendor/jquery/plugins/ellipsis2/jquery.ellipsis2",
"css!styles/index.css"
], function($, Emitter, UrlHandler, Socket, Messenger, Ws, Ext, Pref, VispaUI) { ], function($, Emitter, UrlHandler, Socket, Messenger, Ws, Ext, Pref, VispaUI) {
// return function(){};
/**
* .. js:class:: Vispa
*
* :param object preferences: TODO
* :param object shortcuts: TODO
* :param object extensionPreferences: TODO
*
*/
var Vispa = Emitter._extend({ var Vispa = Emitter._extend({
init: function init(args) { init: function init(args) {
......
...@@ -11,30 +11,11 @@ ...@@ -11,30 +11,11 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" />
</%block> </%block>
<%block name="css_imports">
<%
parent.css_imports()
base.import_css(url.static("css/index.css"))
%>
</%block>
<%block name="js_inline_post"> <%block name="js_inline_post">
<% <%
parent.js_inline_post() parent.js_inline_post()
%> %>
deps = [
"vispa/vispa",
"vendor/jquery/plugins/logger/jquery.logger",
"vendor/jquery/plugins/hotkeys/jquery.hotkeys",
"vendor/jquery/plugins/shortcuts/jquery.shortcuts",
"vendor/jquery/plugins/localesorter/jquery.localesorter",
"vendor/jquery/plugins/polling/jquery.polling",
"vendor/jquery/plugins/lightbox/jquery.lightbox",
"vendor/jquery/plugins/ellipsis2/jquery.ellipsis2"
].concat(deps);
// use template variables to create the template data object // use template variables to create the template data object
var socketUrl = window.location.protocol == "https:" ? "wss" : "ws"; var socketUrl = window.location.protocol == "https:" ? "wss" : "ws";
socketUrl += "://" + window.location.host + "${url.dynamic('bus/index')}"; socketUrl += "://" + window.location.host + "${url.dynamic('bus/index')}";
...@@ -46,7 +27,7 @@ ...@@ -46,7 +27,7 @@
useFeedback : ${"true" if use_feedback else "false"}, useFeedback : ${"true" if use_feedback else "false"},
workspaceAction: "${workspace_action}", workspaceAction: "${workspace_action}",
url: { url: {
dynamicBase: "${base_dynamic}", dynamicBase : "${base_dynamic}",
staticBase : "${base_static}" staticBase : "${base_static}"
}, },
socket: { socket: {
...@@ -73,7 +54,7 @@ ...@@ -73,7 +54,7 @@
} }
}; };
require(deps, function(Vispa) { require(["vispa/vispa"].concat(deps), function(Vispa) {
window.vispa = new Vispa(templateData); window.vispa = new Vispa(templateData);
}); });
</%block> </%block>
......
...@@ -6,24 +6,12 @@ ...@@ -6,24 +6,12 @@
<%inherit file="/vispa.mako" /> <%inherit file="/vispa.mako" />
<%namespace name="base" file="/base.mako" /> <%namespace name="base" file="/base.mako" />
<%block name="css_imports">
<%
parent.css_imports()
base.import_css(url.static("css/login.css"))
%>
</%block>
<%block name="js_inline_post"> <%block name="js_inline_post">
<% <%
parent.js_inline_post() parent.js_inline_post()
%> %>
deps = [ require(["vispa/sites/login"].concat(deps), function(Vispa) {
"vispa/sites/login"
].concat(deps);
require(deps, function(Vispa) {
// use template variables to create the vispa config // use template variables to create the vispa config
var vispaConfig = { var vispaConfig = {
url: { url: {
......
...@@ -6,24 +6,12 @@ ...@@ -6,24 +6,12 @@
<%inherit file="/vispa.mako" /> <%inherit file="/vispa.mako" />
<%namespace name="base" file="/base.mako" /> <%namespace name="base" file="/base.mako" />
<%block name="css_imports">
<%
parent.css_imports()
base.import_css(url.static("css/password.css"))
%>
</%block>
<%block name="js_inline_post"> <%block name="js_inline_post">
<% <%
parent.js_inline_post() parent.js_inline_post()
%> %>
deps = [ require(["vispa/sites/password"].concat(deps), function(Vispa) {
"vispa/sites/password"
].concat(deps);
require(deps, function(Vispa) {
// use template variables to create the vispa config // use template variables to create the vispa config
var vispaConfig = { var vispaConfig = {
url: { url: {
......
...@@ -14,25 +14,6 @@ ...@@ -14,25 +14,6 @@
<link rel="shortcut icon" href="${url.static('img/ico/favicon.ico')}"> <link rel="shortcut icon" href="${url.static('img/ico/favicon.ico')}">
</%block> </%block>
<%block name="css_imports">
<%
base.import_css(url.static("css/icons.css"));
vendor_files = [
"jquery/plugins/lightbox/jquery.lightbox.css",
"bootstrap/css/bootstrap.css",
"bootstrap/plugins/select/bootstrap.select.css",
"bootstrap/plugins/slider/bootstrap.slider.css",
"bootstrap/plugins/fileinput/bootstrap.fileinput.css",
"fuelux/css/fuelux.css",
"fontawesome/css/font-awesome.css"
]
for f in vendor_files:
base.import_css(url.static("vendor/" + f))
%>
</%block>
<%block name="js_imports_pre"> <%block name="js_imports_pre">
<script src="${base_static}/vendor/requirejs/require.js"></script> <script src="${base_static}/vendor/requirejs/require.js"></script>
</%block> </%block>
...@@ -48,7 +29,8 @@ ...@@ -48,7 +29,8 @@
jquery : "vendor/jquery/js/jquery", jquery : "vendor/jquery/js/jquery",
bootstrap : "vendor/bootstrap/js/bootstrap", bootstrap : "vendor/bootstrap/js/bootstrap",
ace : "vendor/ace", ace : "vendor/ace",
extensions: "../extensions" extensions: "../extensions",
"styles" : "css"
}, },
shim: { shim: {
"vendor/jquery/plugins/touchpunch/jquery.touchpunch": ["jquery"], "vendor/jquery/plugins/touchpunch/jquery.touchpunch": ["jquery"],
...@@ -80,7 +62,15 @@ ...@@ -80,7 +62,15 @@
"vendor/jquery/plugins/history/jquery.history", "vendor/jquery/plugins/history/jquery.history",
"vendor/bootstrap/plugins/select/bootstrap.select", "vendor/bootstrap/plugins/select/bootstrap.select",
"vendor/bootstrap/plugins/slider/bootstrap.slider", "vendor/bootstrap/plugins/slider/bootstrap.slider",
"vendor/bootstrap/plugins/fileinput/bootstrap.fileinput" "vendor/bootstrap/plugins/fileinput/bootstrap.fileinput",
"css!styles/icons.css",
"css!vendor/jquery/plugins/lightbox/jquery.lightbox.css",
"css!vendor/bootstrap/css/bootstrap.css",
"css!vendor/bootstrap/plugins/select/bootstrap.select.css",
"css!vendor/bootstrap/plugins/slider/bootstrap.slider.css",
"css!vendor/bootstrap/plugins/fileinput/bootstrap.fileinput.css",
"css!vendor/fuelux/css/fuelux.css",
"css!vendor/fontawesome/css/font-awesome.css"
]; ];
require(["jquery", "vendor/transparency/transparency"], function($, Transparency) { require(["jquery", "vendor/transparency/transparency"], function($, Transparency) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment