Skip to content
Permalink
Browse files

Release v3.6.5 - Merge pull request #1261 from devel

  • Loading branch information...
eos87 committed Jun 4, 2019
2 parents daa1bee + b746b23 commit 2c7ae7fadcb5822d7128856812c6acc4db81e5e7
Showing with 1,178 additions and 507 deletions.
  1. +3 −3 .travis.yml
  2. +1 −1 README.md
  3. +1 −0 client/.eslintignore
  4. +25 −1 client/.eslintrc.js
  5. BIN client/app/favicon-alert.ico
  6. +7 −2 client/app/index.html
  7. +0 −39 client/app/scripts/flux.js
  8. +46 −0 client/app/scripts/flux.ts
  9. +13 −0 client/app/scripts/globals.d.ts
  10. +0 −1 client/app/scripts/index.js
  11. +1 −1 client/app/scripts/liveblog-advertising/activities.js
  12. +1 −1 client/app/scripts/liveblog-advertising/ads-util.service.js
  13. +0 −1 client/app/scripts/liveblog-advertising/controllers/advertising.js
  14. +1 −1 client/app/scripts/liveblog-advertising/index.js
  15. +2 −2 client/app/scripts/liveblog-bloglist/controllers/blog-list.js
  16. +1 −1 client/app/scripts/liveblog-bloglist/directives/user-select-list.js
  17. +22 −0 client/app/scripts/liveblog-common/components/modal/buttons/close.tsx
  18. +12 −0 client/app/scripts/liveblog-common/components/modal/context.ts
  19. +11 −0 client/app/scripts/liveblog-common/components/modal/elements/body.tsx
  20. +11 −0 client/app/scripts/liveblog-common/components/modal/elements/footer.tsx
  21. +15 −0 client/app/scripts/liveblog-common/components/modal/elements/header.tsx
  22. +26 −0 client/app/scripts/liveblog-common/components/modal/modal.tsx
  23. +12 −0 client/app/scripts/liveblog-common/components/modal/types.d.ts
  24. +52 −0 client/app/scripts/liveblog-common/components/modal/withContext.tsx
  25. +103 −0 client/app/scripts/liveblog-edit/components/inactivity.modal.tsx
  26. +122 −82 client/app/scripts/liveblog-edit/controllers/blog-edit.js
  27. +2 −3 client/app/scripts/liveblog-edit/controllers/blog-settings.js
  28. +3 −1 client/app/scripts/liveblog-edit/directives/freetype-image.js
  29. +0 −1 client/app/scripts/liveblog-edit/directives/freetype-render.js
  30. +6 −2 client/app/scripts/liveblog-edit/directives/freetype-text.js
  31. +7 −3 client/app/scripts/liveblog-edit/directives/post.js
  32. +1 −0 client/app/scripts/liveblog-edit/directives/posts-list.js
  33. +2 −3 client/app/scripts/liveblog-edit/freetype.service.js
  34. +2 −0 client/app/scripts/liveblog-edit/module.js
  35. +7 −3 client/app/scripts/liveblog-edit/pages-manager.service.js
  36. +3 −2 client/app/scripts/liveblog-edit/posts.service.js
  37. +19 −0 client/app/scripts/liveblog-edit/styles/liveblog-edit.scss
  38. +3 −1 client/app/scripts/liveblog-edit/views/main.ng1
  39. +0 −1 client/app/scripts/liveblog-freetypes/module.js
  40. +1 −2 client/app/scripts/liveblog-marketplace/index.js
  41. +0 −1 client/app/scripts/liveblog-syndication/directives/ingest-panel.js
  42. +1 −1 client/app/scripts/liveblog-syndication/index.js
  43. +8 −4 client/app/scripts/liveblog-themes/module.js
  44. +9 −1 client/app/scripts/ng-sir-trevor.js
  45. +9 −7 client/app/scripts/sir-trevor-blocks/helpers/media-uploader.js
  46. +1 −1 client/app/scripts/sir-trevor-blocks/helpers/retry-handler.js
  47. +1 −1 client/app/scripts/sir-trevor-blocks/image-block.js
  48. +2 −2 client/app/scripts/sir-trevor-blocks/index.js
  49. +13 −9 client/app/scripts/sir-trevor-blocks/video-block.js
  50. +16 −4 client/app/styles/sass/liveblog.scss
  51. +25 −17 client/package.json
  52. +1 −1 client/spec/helpers/pages.js
  53. +1 −0 client/tasks/options/copy.js
  54. +5 −3 client/tasks/options/eslint.js
  55. +22 −0 client/tsconfig.json
  56. +51 −0 client/tslint.json
  57. +18 −20 client/webpack.config.js
  58. +1 −1 package.json
  59. +2 −1 server/liveblog/blogs/templates/embed_amp.html
  60. +0 −6 server/liveblog/themes/themes_assets/amp/dist/amp-59064b5e85.css
  61. +6 −0 server/liveblog/themes/themes_assets/amp/dist/amp-dde572bbac.css
  62. +1 −1 server/liveblog/themes/themes_assets/amp/dist/rev-manifest.json
  63. +44 −112 server/liveblog/themes/themes_assets/amp/less/embed.less
  64. +2 −6 server/liveblog/themes/themes_assets/amp/less/z_comments.less
  65. +1 −1 server/liveblog/themes/themes_assets/amp/package.json
  66. +1 −1 server/liveblog/themes/themes_assets/amp/template.html
  67. +7 −4 server/liveblog/themes/themes_assets/amp/templates/template-comment.html
  68. +2 −1 server/liveblog/themes/themes_assets/amp/templates/template-index.html
  69. +1 −1 server/liveblog/themes/themes_assets/amp/templates/template-timeline.html
  70. +13 −13 server/liveblog/themes/themes_assets/amp/theme.json
  71. +6 −6 server/liveblog/themes/themes_assets/angular/liveblog-embed/comments.service.js
  72. +6 −6 server/liveblog/themes/themes_assets/angular/liveblog-embed/resources.service.js
  73. +1 −1 server/liveblog/themes/themes_assets/classic/dist/scripts.min.js
  74. +21 −0 server/liveblog/themes/themes_assets/classic/dist/styles.min.css
  75. +1 −1 server/liveblog/themes/themes_assets/classic/dist/templates.js
  76. +22 −0 server/liveblog/themes/themes_assets/classic/styles/embed.css
  77. +12 −4 server/liveblog/themes/themes_assets/classic/template.html
  78. +1 −1 server/liveblog/themes/themes_assets/classic/theme.json
  79. +2 −2 server/liveblog/themes/themes_assets/classic/views/comments.html
  80. +0 −1 server/liveblog/themes/themes_assets/default/dist/default-60c22e8702.css
  81. +0 −13 server/liveblog/themes/themes_assets/default/dist/default-81133a7c3c.js
  82. +1 −0 server/liveblog/themes/themes_assets/default/dist/default-adddf70ec7.css
  83. +13 −0 server/liveblog/themes/themes_assets/default/dist/default-cf6c86cf0a.js
  84. +2 −2 server/liveblog/themes/themes_assets/default/dist/rev-manifest.json
  85. +0 −10 server/liveblog/themes/themes_assets/default/images/share_google.svg
  86. +5 −0 server/liveblog/themes/themes_assets/default/images/share_telegram.svg
  87. +19 −0 server/liveblog/themes/themes_assets/default/images/share_viber.svg
  88. +5 −0 server/liveblog/themes/themes_assets/default/images/share_whatsapp.svg
  89. +2 −1 server/liveblog/themes/themes_assets/default/js/theme/slideshow.js
  90. +24 −7 server/liveblog/themes/themes_assets/default/less/embed.less
  91. +4 −2 server/liveblog/themes/themes_assets/default/less/slideshow.less
  92. +1 −1 server/liveblog/themes/themes_assets/default/package.json
  93. +19 −15 server/liveblog/themes/themes_assets/default/templates/template-comment.html
  94. +3 −0 server/liveblog/themes/themes_assets/default/templates/template-embed-providers.html
  95. +14 −5 server/liveblog/themes/themes_assets/default/templates/template-post-actions.html
  96. +15 −15 server/liveblog/themes/themes_assets/default/theme.json
  97. +2 −2 server/liveblog/themes/themes_assets/simple/dist/rev-manifest.json
  98. +16 −0 server/liveblog/themes/themes_assets/simple/dist/simple-6a706fbb9d.js
  99. +2 −0 server/liveblog/themes/themes_assets/simple/dist/simple-91730d9196.css
  100. +0 −2 server/liveblog/themes/themes_assets/simple/dist/simple-a22d182a49.css
  101. +0 −15 server/liveblog/themes/themes_assets/simple/dist/simple-d174c94b04.js
  102. +5 −0 server/liveblog/themes/themes_assets/simple/images/share_telegram.svg
  103. +19 −0 server/liveblog/themes/themes_assets/simple/images/share_viber.svg
  104. +5 −0 server/liveblog/themes/themes_assets/simple/images/share_whatsapp.svg
  105. +2 −2 server/liveblog/themes/themes_assets/simple/package.json
  106. +114 −13 server/liveblog/themes/themes_assets/simple/theme.json
  107. +6 −2 server/settings.py
@@ -88,16 +88,16 @@ script:
- cd $TRAVIS_BUILD_DIR/server && nosetests --all-modules --nocapture;
- cd $TRAVIS_BUILD_DIR/server && behave --format progress2 --logging-level ERROR ;
- cd $TRAVIS_BUILD_DIR/server && flake8 ;
- cd $TRAVIS_BUILD_DIR/client && npm test ;
- cd $TRAVIS_BUILD_DIR/client && npm run lint ;
- cd $TRAVIS_BUILD_DIR/server
- python3 app_init_elastic.py ;
- python3 manage.py app:initialize_data ;
- python3 manage.py users:create -u admin -p admin -e 'admin@example.com' --admin ;
- python3 manage.py register_local_themes ;
- python3 manage.py register_bloglist ;
- cd $TRAVIS_BUILD_DIR/client
- ./node_modules/protractor/bin/webdriver-manager update --gecko false --versions.chrome=2.46 --versions.standalone=3.9.1
- ./node_modules/.bin/protractor protractor-conf.js
- npm run webdriver-update
- npm run e2e

after_script:
- killall -9 python
@@ -3,7 +3,7 @@
[Fork](https://github.com/liveblog/liveblog) •
[License](https://github.com/liveblog/liveblog/blob/master/LICENSE) •
[Documentation](http://sourcefabric.booktype.pro/live-blog-30-for-journalists/what-is-live-blog/) •
*Version 3.6.4*
*Version 3.6.5*

[![Build Status](https://travis-ci.org/liveblog/liveblog.svg?branch=master)](https://travis-ci.org/liveblog/liveblog)

@@ -1,3 +1,4 @@
*.d.ts
*.generated.js
missing-translations-strings.js
language-mapping-list.js
@@ -1 +1,25 @@
module.exports = require('superdesk-code-style');
const superdeskRules = require('superdesk-code-style');

module.exports = Object.assign({}, superdeskRules, {
'overrides': [
{
files: ['*.ts', '*.tsx'],
plugins: [
'@typescript-eslint/tslint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json'
},
rules: {
'@typescript-eslint/tslint/config': [2, {
lintFile: './tslint.json',
}],
'arrow-body-style': 0,
'react/prop-types': 0,
'object-curly-spacing': [2, 'always'],
'no-empty-function': [2, { 'allow': ['arrowFunctions'] }]
}
}
]
});
Binary file not shown.
@@ -17,6 +17,11 @@
<body class="ng-cloak">

<div sd-superdesk-view></div>

<a class="btn btn--primary btn--contact-support" target="_blank" href="https://sourcefabricberlin.zendesk.com/hc/en-us/requests/new">
Contact Support
</a>

<div class="dropdown help-link liveblog-help" dropdown style="visibility: hidden">
<div class="dropdown__toggle" dropdown__toggle style="cursor:pointer">Help <b class="caret"></b></div>
<ul class="dropdown__menu" style="min-width: 90px;">
@@ -47,10 +52,10 @@ <h3 class="modal__heading" translate>About</h3>
<div class="about-page-text">
<p>
<div style="font-weight: 700" translate>
Live Blog 3.6.4
Live Blog 3.6.5
</div>
<div translate>
Released on 03/05/2019
Released on 04/06/2019
</div>
</p>
<p translate>

This file was deleted.

@@ -0,0 +1,46 @@
export default angular.module('liveblog.flux', [])
.factory('Dispatcher', () => ({
dispatch: (action: IAnyAction) => {
document.dispatchEvent(
new CustomEvent<IAnyAction>('dispatch', { detail: action })
);
},
}))
.factory('Store', () => {
class Store<S = any> {
state: S;
reducer: Reducer<S>;
listeners: Array<Listener>;

constructor(reducer, initialState: S) {
this.state = initialState;
this.reducer = reducer;
this.listeners = [];

document.addEventListener('dispatch', this.dispatcher);
}

connect = (listener: Listener) => {
this.listeners.push(listener);
}

dispatch = (action: IAnyAction) => {
this.state = this.reducer(this.state, action);
const state = this.state;

this.listeners.forEach((listener) => {
listener(state);
});
}

dispatcher = (evData: CustomEvent<IAnyAction>) => {
this.dispatch(evData.detail);
}

destroy = () => {
document.removeEventListener('dispatch', this.dispatcher);
}
}

return Store;
});
@@ -0,0 +1,13 @@
declare const angular: IAngularStatic;

type Action<T = any> = {
type: T;
};

interface IAnyAction extends Action {
[prop: string]: any;
}

type Listener = (state: any) => void;

type Reducer<S = any> = (state: S, action: IAnyAction) => S;
@@ -30,7 +30,6 @@ import moment from 'moment-timezone';

_.sortByOrder = require('lodash.sortbyorder');


import 'superdesk-core/scripts/core/activity';
import 'superdesk-core/scripts/core/analytics';
import 'superdesk-core/scripts/core/api';
@@ -13,4 +13,4 @@ export default function activities(superdesk) {
privileges: {global_preferences: 1},
templateUrl: adManagTemplate,
});
}
}
@@ -19,4 +19,4 @@ export default function adsUtil() {
}
return invalid;
}
}
}
@@ -24,7 +24,6 @@ export default function LiveblogAdvertisingController($scope, api, notify, gette
$scope.advertModalTpl = advertModalTpl;
$scope.collectionModalTpl = collectionModalTpl;


$scope.freetypesData = {}; $scope.freetypeControl = {}; $scope.validation = {};
$scope.adTypes = [
{
@@ -4,4 +4,4 @@ import adsUtil from './ads-util.service.js';

angular.module('liveblog.advertising', ['liveblog.edit'])
.config(activities)
.service('adsUtilSevice', adsUtil);
.service('adsUtilSevice', adsUtil);
@@ -150,7 +150,7 @@ export default function BlogListController(
const deferred = $q.defer();

const changedBlog = {
blog_status: activeState.name == 'active' ? 'closed' : 'open',
blog_status: activeState.name === 'active' ? 'closed' : 'open',
};

let newBlog = angular.copy(blog);
@@ -166,7 +166,7 @@ export default function BlogListController(
newBlog.original_creator = blog.original_creator._id;
blogService.update(blog, newBlog).then((blog) => {
notify.pop();
if (blog.blog_status == 'closed') {
if (blog.blog_status === 'closed') {
notify.info(gettext('Blog(s) moved to archived'));
} else {
notify.info(gettext('Blog(s) is actived now'));
@@ -126,4 +126,4 @@ export default function lbUserSelectList(api) {
scope.getUserDisplay = (user) => user.display_name;
},
};
}
}
@@ -0,0 +1,22 @@
import React from 'react';
import ModalContext from '../context';

interface IProps {
text?: string;
}

const CloseBtn: React.SFC<IProps> = (props) => {
return (
<ModalContext.Consumer>
{({ closeModal }) => (
<button onClick={closeModal} type="button"
className="btn" data-dismiss="modal" aria-label="Close"
>
<span aria-hidden="true">{props.text || 'Close'}</span>
</button>
)}
</ModalContext.Consumer>
);
};

export default CloseBtn;
@@ -0,0 +1,12 @@
import React from 'react';
import { IModalContext } from './types'; // eslint-disable-line

const ModalContext = React.createContext<IModalContext>({
modalRef: null,
// tslint:disable-next-line:no-empty
closeModal: () => {},
// tslint:disable-next-line:no-empty
openModal: () => {},
});

export default ModalContext;
@@ -0,0 +1,11 @@
import * as React from 'react';

const Body: React.SFC = (props) => {
return (
<div className="modal__body">
{props.children}
</div>
);
};

export default Body;
@@ -0,0 +1,11 @@
import React from 'react';

const Footer: React.SFC = (props) => {
return (
<div className="modal__footer">
{props.children}
</div>
);
};

export default Footer;
@@ -0,0 +1,15 @@
import * as React from 'react';

interface IProps {
title: string;
}

const Header: React.SFC<IProps> = (props) => {
return (
<div className="modal__header">
<h3 className="modal-title">{props.title}</h3>
</div>
);
};

export default Header;
@@ -0,0 +1,26 @@
import React from 'react';
import Header from './elements/header';
import Body from './elements/body';
import Footer from './elements/footer';
import ModalContext from './context';
import { IModalProps } from './types'; // eslint-disable-line

const Modal: React.SFC<IModalProps> = (props) => {
return (
<ModalContext.Consumer>
{({ modalRef }) => (
<div ref={modalRef} className={`modal fade ${props.modalClass || ''}`} tabIndex={-1} role="dialog">
<div className="modal__dialog v2" role="document">
<div className="modal__content">
<Header title={props.title} />
<Body>{props.body}</Body>
<Footer>{props.footer}</Footer>
</div>
</div>
</div>
)}
</ModalContext.Consumer>
);
};

export default Modal;
@@ -0,0 +1,12 @@
export interface IModalProps {
title: string;
body: any;
footer: any;
modalClass?: string;
}

export interface IModalContext {
openModal: () => void;
closeModal: () => void;
modalRef: React.RefObject;
}

0 comments on commit 2c7ae7f

Please sign in to comment.
You can’t perform that action at this time.