diff --git a/lib/Utils/MultiCurlHandler.php b/lib/Utils/MultiCurlHandler.php index b8864ff681..160f0c17a1 100644 --- a/lib/Utils/MultiCurlHandler.php +++ b/lib/Utils/MultiCurlHandler.php @@ -399,6 +399,15 @@ public function getErrors() { return array_filter( $map ); // <- remove null array entries } + /** + * @param $tokenHash + * + * @return int + */ + public function getStatusCode( $tokenHash ) { + return (int)$this->multi_curl_info[ $tokenHash ][ 'http_code' ]; + } + public function clear(){ $this->multiCurlCloseAll(); $this->curl_headers_requests = []; @@ -428,4 +437,4 @@ protected function _callbackExecute( $record, Callable $function = null ){ return $record; } -} +} diff --git a/public/css/sass/segment-notes.scss b/public/css/sass/segment-notes.scss index 902913d877..0fa36aea2e 100644 --- a/public/css/sass/segment-notes.scss +++ b/public/css/sass/segment-notes.scss @@ -85,6 +85,12 @@ div.segment-notes ul.graysmall li span.note-label { font-weight: bold; } +.segments-notes-container div.note-style-guide > ul { + list-style-type: square; + padding-left: 14px; + margin-top: 6px; +} + .tab-preview-screenshot { text-align: center; padding-top: 10px; diff --git a/public/js/cat_source/es6/actions/SegmentActions.js b/public/js/cat_source/es6/actions/SegmentActions.js index 7656637583..22633d539a 100644 --- a/public/js/cat_source/es6/actions/SegmentActions.js +++ b/public/js/cat_source/es6/actions/SegmentActions.js @@ -365,6 +365,13 @@ const SegmentActions = { type: type, }) }, + addLexiqaStyleGuideMessages: function (sid, styleGuideMessages) { + AppDispatcher.dispatch({ + actionType: SegmentConstants.ADD_LXQ_STYLE_GUIDE_MESSAGES, + sid, + styleGuideMessages, + }) + }, selectNextSegmentDebounced: _.debounce(() => { SegmentActions.selectNextSegment() }, 100), diff --git a/public/js/cat_source/es6/components.js b/public/js/cat_source/es6/components.js index ceb469055f..cf1614869b 100644 --- a/public/js/cat_source/es6/components.js +++ b/public/js/cat_source/es6/components.js @@ -28,6 +28,7 @@ import CursorUtils from './utils/cursorUtils' import OfflineUtils from './utils/offlineUtils' import Shortcuts from './utils/shortcuts' import SegmentFooterTabMatches from './components/segments/SegmentFooterTabMatches' +import {pluginOptions as lexiqaTooltipWarningPluginOptions} from './api/lexiqaTooltipwarnings' window.MC = {} @@ -66,3 +67,5 @@ window.OfflineUtils = OfflineUtils window.Shortcuts = Shortcuts window.SegmentFooterTabMatches = SegmentFooterTabMatches + +window.lexiqaTooltipWarningPluginOptions = lexiqaTooltipWarningPluginOptions diff --git a/public/js/cat_source/es6/components/segments/SegmentFooterTabMessages.js b/public/js/cat_source/es6/components/segments/SegmentFooterTabMessages.js index 59b2b96783..c6345d856c 100644 --- a/public/js/cat_source/es6/components/segments/SegmentFooterTabMessages.js +++ b/public/js/cat_source/es6/components/segments/SegmentFooterTabMessages.js @@ -10,6 +10,7 @@ class SegmentFooterTabMessages extends React.Component { } getNotes() { + console.log(this.props.segment.styleGuideMessages) let notesHtml = [] let self = this if (this.props.notes) { @@ -108,6 +109,19 @@ class SegmentFooterTabMessages extends React.Component { ) } + getStyleGuideMessages(messages) { + return ( +