Skip to content

Commit

Permalink
Merge pull request #779 from nistormihai/devel-merge
Browse files Browse the repository at this point in the history
Devel merge
  • Loading branch information
nistormihai committed Jul 3, 2014
2 parents 63bfd5e + 8726cf8 commit 2538472
Show file tree
Hide file tree
Showing 12 changed files with 1,033 additions and 50 deletions.
18 changes: 8 additions & 10 deletions plugins/embed/config.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,18 @@
},
"liveblog": {
"id": 1,
"servers": {
"frontend": "<%= servers.proxy %>",
"css": "<%= liveblog.servers.frontend %>"
},
"servers": {},
"paths": {
"scripts": "/scripts/js/",
"css": "/"
"scripts": "/content/lib/embed/scripts/js/",
"css": "../../../content/lib/embed/",
"themes": "../../themes/",
"buildThemes": "./build/themes"
},
"render": "index,seo,embed,livereload",
"render": "seo,embed",
"theme": "default",
"fallback": {
"language": "en"
"language": "de"
},
"dev": true,
"hashmark": "#"
}
}
}
11 changes: 6 additions & 5 deletions plugins/embed/gui-resources/scripts/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ var configLiveblog = function(liveconfig, config) {
liveconfig.browserUrl = urlHref.browserUrl;
if (liveconfig.servers.rest) {
liveconfig.servers.rest = urlHref.serverUrl(liveconfig.servers.rest);

liveconfig.servers.frontend = liveconfig.servers.frontend ?
liveconfig.servers.frontend : liveconfig.servers.rest;

liveconfig.servers.css = liveconfig.servers.css ?
liveconfig.servers.css : liveconfig.servers.rest;
}

liveconfig.servers.frontend = urlHref.serverUrl(
Expand All @@ -102,11 +108,6 @@ var configLiveblog = function(liveconfig, config) {
config.servers.nodejs)
);

liveconfig.servers.css = urlHref.serverUrl(
liveconfig.servers.css ?
liveconfig.servers.css :
liveconfig.servers.rest);

liveconfig.servers.livereload = urlHref.replacePort(liveconfig.servers.frontend, config.servers.livereload);

return liveconfig;
Expand Down
4 changes: 2 additions & 2 deletions plugins/embed/gui-resources/scripts/js/build/main.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions plugins/embed/gui-resources/scripts/js/lib/require/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ define(['lib/utils', 'plugins/css', 'backbone'], function(utils, pluginCss, Back
var configCss = config.config.css,
cssUrl = req.toUrl(name + '.css');

if (liveblog.paths.css) {
cssUrl = cssUrl.replace(liveblog.paths.scripts, liveblog.paths.css + liveblog.paths.scripts.substring(1));
}

if (liveblog.min) {
cssUrl = cssUrl.replace(liveblog.paths.build, liveblog.paths.themes);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/embed/gui-resources/scripts/js/views/blog.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ define([
// Render only if there isn't a generated content.
conditionalRender: function() {
// If there is no previous generated HTML markup, render the view.
if (this.$(this.rootSel).length === 0) {
if (this.$el.parent().find(this.rootSel).length === 0) {
this.render();
// If the markup is already there, use it.
} else {
Expand Down
23 changes: 0 additions & 23 deletions plugins/embed/gui-themes/themes/stt/desktop/base-theme.less
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
/******************* outer page styles ****************/
/******************************************************/
//should be changed to fit the client requests
body, html {
margin: 0;
padding: 0;
}
body {
background: #fff;
}

.container {
width: 620px;
margin-left: 20px;
margin-top: 20px;
overflow: hidden; //quirks fix
}


/******************************************************/
/******************************************************/


@lb-font : Arial, Helvetica, sans-serif;

@lb-width : 100%;
Expand Down
5 changes: 4 additions & 1 deletion plugins/embed/gui-themes/themes/stt/quirks/container.dust
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
{>"themeBase/container"/}
{<additionalAttributes}class="quirks"{/additionalAttributes}
{<additionalAttributes}class="quirks"{/additionalAttributes}

{<contentBottomContainer}
{/contentBottomContainer}
17 changes: 14 additions & 3 deletions plugins/embed/gui-themes/themes/stt/quirks/item/base.dust
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
{>"themeBase/item/base"/}

{<headerContainer}
{/headerContainer}

{<contentSide}
{+postDateContainer}{/postDateContainer}
{+userAvatar}{/userAvatar}
{+userNameContainer}{/userNameContainer}
<a class="logo-badge" href="#" title="by STT"></a>
{+shareContainer}{/shareContainer}
{/contentSide}


{<userAvatar}
{?AuthorImage}
<div class="post-publisher-avatar">
<img class="post-publisher-avatar-img" src="{AuthorImage.href}"/>
</div>
{:else}
<div class="post-publisher-avatar">
<img src="{servers.frontend}/content/lib/livedesk-embed/themes/stt/quirks/img/default-liveblog-avatar_48.png" class="post-publisher-avatar-img">
</div>
<div class="post-publisher-avatar blank"></div>
{/AuthorImage}
{/userAvatar}
996 changes: 995 additions & 1 deletion plugins/embed/gui-themes/themes/stt/quirks/liveblog.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions plugins/embed/test/client/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = function(config) {
{pattern: 'node_modules/dustjs-helpers/dist/dust-helpers.min.js', included: false},
{pattern: 'node_modules/jed/jed.js', included: false},
{pattern: 'node_modules/moment/min/moment.min.js', included: false},
{pattern: 'bower_components/moment-timezone/builds/moment-timezone-with-data-2010-2020.js', included: false},
{pattern: 'test/client/**/*.spec.js', included: false}
],

Expand Down
1 change: 1 addition & 0 deletions plugins/embed/test/client/test-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ require.config({
'backbone-custom': 'lib/backbone/backbone-custom',
'backbone.layoutmanager': '../../../node_modules/backbone.layoutmanager/backbone.layoutmanager',
'moment': '../../../node_modules/moment/min/moment.min',
'moment-timezone': 'bower_components/moment-timezone/builds/moment-timezone-with-data-2010-2020',
'themeBase': '../../../gui-themes/themes/base',
'tmpl': 'lib/require/tmpl'
//'i18n': 'lib/require/i18n',
Expand Down
1 change: 1 addition & 0 deletions plugins/embed/test/server/spechelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ requirejs.config({
i18n: 'lib/require/i18n',
themeBase: '../../../gui-themes/themes/base',
'lodash.compat': '../../../node_modules/lodash/dist/lodash.compat',
'moment-timezone': 'bower_components/moment-timezone/builds/moment-timezone-with-data-2010-2020',
'css': 'lib/require/css'
},
map: {
Expand Down

0 comments on commit 2538472

Please sign in to comment.