diff --git a/bower.json b/bower.json index b720812a..b0844f32 100644 --- a/bower.json +++ b/bower.json @@ -1,15 +1,29 @@ { "name": "stf", - "version": "0.0.0", + "version": "0.1.0", "dependencies": { - "angular": "~1.2.14", - "angular-route": "~1.2.14", - "requirejs": "~2.1.10", + "angular": "~1.3.0-beta.2", + "angular-route": "~1.3.0-beta.2", "se7en-bootstrap-3": "git@ghe.amb.ca.local:stf/se7en-bootstrap-3.git", "socket.io-client": "~0.9.16", "lodash": "~2.4.1", - "oboe": "~1.14.0", - "fa-borderlayout": "git@ghe.amb.ca.local:gunther-brunner/fa-borderlayout.git" + "oboe": "~1.14.2", + "fa-borderlayout": "git@ghe.amb.ca.local:gunther-brunner/fa-borderlayout.git", + "Snap.svg": "~0.2.0", + "angular-localForage": "~0.0.2", + "ng-table": "~0.3.1", + "angular-ui-bootstrap": "~0.10.0", + "jquery.terminal": "~0.8.4", + "stf-site": "git@ghe.amb.ca.local:stf/stf-site.git", + "angular-gettext": "~0.2.5", + "angular-ui-ace": "~0.1.0", + "ui-bootstrap-alerts": "~0.1.5", + "angular-sanitize": "~1.2.14", + "requirejs": "~2.1.11", + "stf-graphics": "git@ghe.amb.ca.local:stf/stf-graphics.git" }, - "private": true + "private": true, + "resolutions": { + "angular": "~1.3.0-beta.2" + } } diff --git a/lib/roles/app.js b/lib/roles/app.js index 2d1b0245..be8a56f6 100644 --- a/lib/roles/app.js +++ b/lib/roles/app.js @@ -41,6 +41,7 @@ module.exports = function(options) { app.use(cors()) app.use('/static/bower_components', express.static(pathutil.resource('bower_components'))) + app.use('/static/data', express.static(pathutil.resource('data'))) app.use('/static', express.static(pathutil.resource('app'))) if (!options.disableWatch) { diff --git a/lib/roles/auth/ldap.js b/lib/roles/auth/ldap.js index 2e39e547..531ca0a0 100644 --- a/lib/roles/auth/ldap.js +++ b/lib/roles/auth/ldap.js @@ -29,6 +29,7 @@ module.exports = function(options) { app.use(express.csrf()) app.use(validator()) app.use('/static/bower_components', express.static(pathutil.resource('bower_components'))) + app.use('/static/data', express.static(pathutil.resource('data'))) app.use('/static', express.static(pathutil.resource('auth-ldap'))) app.use(function(req, res, next) { diff --git a/lib/roles/auth/mock.js b/lib/roles/auth/mock.js index d9443dc5..aae18287 100644 --- a/lib/roles/auth/mock.js +++ b/lib/roles/auth/mock.js @@ -28,6 +28,7 @@ module.exports = function(options) { app.use(express.csrf()) app.use(validator()) app.use('/static/bower_components', express.static(pathutil.resource('bower_components'))) + app.use('/static/data', express.static(pathutil.resource('data'))) app.use('/static', express.static(pathutil.resource('auth-mock'))) app.use(function(req, res, next) { diff --git a/res/app/app.js b/res/app/app.js index 3291c66f..a2a5a6e4 100644 --- a/res/app/app.js +++ b/res/app/app.js @@ -1,26 +1,14 @@ require('angular') require('angular-route') -require('style!raw!se7en-bootstrap-3/build/stylesheets/bootstrap.min.css') -require('style!raw!se7en-bootstrap-3/build/stylesheets/se7en-font.css') -require('style!raw!se7en-bootstrap-3/build/stylesheets/style.css') -require('style!raw!se7en-bootstrap-3/build/stylesheets/font-awesome.min.css') - - -// Temporary here: -require('fa-borderlayout') -require('fa-borderlayout/build-0.3.1/borderLayout.css') -require('fa-borderlayout/build-0.3.1/stf-style.css') - - - - +require('angular-gettext') angular.module('app', [ 'ngRoute', + 'gettext', + require('./layout').name, require('./device-list').name, - require('./device-control').name, - 'fa.directive.borderLayout' + require('./device-control').name ]) .config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { diff --git a/res/app/layout/index.js b/res/app/layout/index.js new file mode 100644 index 00000000..d56104ee --- /dev/null +++ b/res/app/layout/index.js @@ -0,0 +1,21 @@ +require('style!raw!se7en-bootstrap-3/build/stylesheets/bootstrap.min.css') +require('style!raw!se7en-bootstrap-3/build/stylesheets/se7en-font.css') +require('style!raw!se7en-bootstrap-3/build/stylesheets/style.css') +require('style!raw!se7en-bootstrap-3/build/stylesheets/font-awesome.min.css') + + +// Temporary here: +require('fa-borderlayout') +require('fa-borderlayout/build-0.3.1/borderLayout.css') +require('fa-borderlayout/build-0.3.1/stf-style.css') + + +require('./cursor.css') +require('./stf-se7en.css') +require('style!raw!./stf-styles.css') +require('./small.css') + +module.exports = angular.module('layout', [ + 'fa.directive.borderLayout' +]) + .controller('LayoutCtrl', require('./layout-controller')) diff --git a/res/app/layout/layout-controller.js b/res/app/layout/layout-controller.js new file mode 100644 index 00000000..f4f4dbe7 --- /dev/null +++ b/res/app/layout/layout-controller.js @@ -0,0 +1,3 @@ +module.exports = function LayoutCtrl($scope) { + +} diff --git a/res/app/layout/stf-styles.css b/res/app/layout/stf-styles.css index e7c3c087..33a347b1 100644 --- a/res/app/layout/stf-styles.css +++ b/res/app/layout/stf-styles.css @@ -350,7 +350,7 @@ svg { } .stf-logo { - background: url("../img/favicon128.png") no-repeat 0 0; + background: url("../../data/images/favicon128.png") no-repeat 0 0; width: 32px; height: 32px; float: left; diff --git a/res/app/views/index.jade b/res/app/views/index.jade index aa01c531..c0ebfa2e 100644 --- a/res/app/views/index.jade +++ b/res/app/views/index.jade @@ -3,6 +3,35 @@ html head meta(charset='utf-8') title STF - body(ng-app='app', ng-cloak) - div(ng-view) + body(ng-app='app', ng-cloak).bg-1.fill-height + div(ng-controller='LayoutCtrl').fill-height + div(pane).fill-height + .pane-top-bar(pane, pane-anchor='north', pane-size='46px', pane-min='46px', pane-max='46px', pane-handle='') + .navbar + .container-fluid.stf-top-bar + a.stf-logo(href="/") STF2 + ul.nav.stf-nav + li(ng-cloak) + a(href='/#/control') + span.fa.fa-mobile + | {{"Control"|translate}} + a(href='/#/devices') + span.fa.fa-sitemap + | {{"Devices"|translate}} + a(href='/#/settings') + span.fa.fa-gears + | {{"Settings"|translate}} + ul.nav.stf-nav.stf-feedback.pull-right(ng-cloak) + li.stf-nav-web-native-button + .btn-group + button(type='button', ng-model='$root.platform', btn-radio="'web'", translate).btn.btn-sm.btn-default-outline Web + button(type='button', ng-model='$root.platform', btn-radio="'native'", translate).btn.btn-sm.btn-default-outline Native + li + a(ng-href='/#/help') + i.fa.fa-question-circle + | {{"Help"|translate}} + div(pane, pane-anchor='center').fill-height + div(ng-view).fill-height + + //div(ng-view) script(src='/static/build/bundle.js') \ No newline at end of file diff --git a/res/auth-ldap/views/index.jade b/res/auth-ldap/views/index.jade index 587c23e5..e074c84d 100644 --- a/res/auth-ldap/views/index.jade +++ b/res/auth-ldap/views/index.jade @@ -6,4 +6,4 @@ html include partials/styles body(ng-cloak) div(ng-view) - script(src='/static/lib/requirejs/require.js', data-main='static/scripts/main.js') + script(src='/static/bower_components/requirejs/require.js', data-main='static/scripts/main.js') diff --git a/res/auth-ldap/views/partials/signin.jade b/res/auth-ldap/views/partials/signin.jade index 52620d41..2cfceba9 100644 --- a/res/auth-ldap/views/partials/signin.jade +++ b/res/auth-ldap/views/partials/signin.jade @@ -1,7 +1,7 @@ .login2 .login-wrapper a(href='./') - img(width='128', height='128', src='/static/images/logo-128.png', title='STF') + img(width='128', height='128', src='/static/bower_components/stf-graphics/logo/exports/STF-128.png', title='STF') form(name='signin', novalidate, ng-submit='submit()') .alert.alert-danger(ng-show='error') diff --git a/res/auth-ldap/views/partials/styles.jade b/res/auth-ldap/views/partials/styles.jade index 9b52edd2..c4e23d82 100644 --- a/res/auth-ldap/views/partials/styles.jade +++ b/res/auth-ldap/views/partials/styles.jade @@ -1,6 +1,6 @@ link(href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700', media='all', rel='stylesheet', type='text/css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/bootstrap.min.css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/se7en-font.css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/style.css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/font-awesome.min.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/bootstrap.min.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/se7en-font.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/style.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/font-awesome.min.css') link(rel='stylesheet', href='/static/styles/login.css') diff --git a/res/auth-mock/views/index.jade b/res/auth-mock/views/index.jade index 587c23e5..e074c84d 100644 --- a/res/auth-mock/views/index.jade +++ b/res/auth-mock/views/index.jade @@ -6,4 +6,4 @@ html include partials/styles body(ng-cloak) div(ng-view) - script(src='/static/lib/requirejs/require.js', data-main='static/scripts/main.js') + script(src='/static/bower_components/requirejs/require.js', data-main='static/scripts/main.js') diff --git a/res/auth-mock/views/partials/signin.jade b/res/auth-mock/views/partials/signin.jade index 422d3c15..76d15cd9 100644 --- a/res/auth-mock/views/partials/signin.jade +++ b/res/auth-mock/views/partials/signin.jade @@ -1,7 +1,7 @@ .login2 .login-wrapper a(href='./') - img(width='128', height='128', src='/static/images/logo-128.png', title='STF') + img(width='128', height='128', src='/static/bower_components/stf-graphics/logo/exports/STF-128.png', title='STF') form(name='signin', novalidate, ng-submit='submit()') .alert.alert-danger(ng-show='error') diff --git a/res/auth-mock/views/partials/styles.jade b/res/auth-mock/views/partials/styles.jade index 9b52edd2..c4e23d82 100644 --- a/res/auth-mock/views/partials/styles.jade +++ b/res/auth-mock/views/partials/styles.jade @@ -1,6 +1,6 @@ link(href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700', media='all', rel='stylesheet', type='text/css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/bootstrap.min.css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/se7en-font.css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/style.css') -link(rel='stylesheet', href='/static/lib/se7en-bootstrap-3/build/stylesheets/font-awesome.min.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/bootstrap.min.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/se7en-font.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/style.css') +link(rel='stylesheet', href='/static/bower_components/se7en-bootstrap-3/build/stylesheets/font-awesome.min.css') link(rel='stylesheet', href='/static/styles/login.css')