solomax commented on a change in pull request #103: URL: https://github.com/apache/openmeetings/pull/103#discussion_r534233249
########## File path: openmeetings-web/pom.xml ########## @@ -163,7 +163,8 @@ <jsSourceFile>raw-tool-arrow.js</jsSourceFile> <jsSourceFile>raw-tool-clipart.js</jsSourceFile> <jsSourceFile>raw-wb-board.js</jsSourceFile> - <jsSourceFile>raw-wb-area.js</jsSourceFile> + <jsSourceFile>raw-wb-area.js</jsSourceFile> Review comment: please do not create trailing spaces ########## File path: openmeetings-web/pom.xml ########## @@ -264,7 +265,7 @@ <jsEngine>CLOSURE</jsEngine> <jsTargetDir>../generated-sources/main/java/org/apache/openmeetings/web/user/chat</jsTargetDir> </configuration> - </execution> + </execution> Review comment: please do not create trailing spaces ########## File path: openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js ########## @@ -369,6 +370,52 @@ var Wb = function() { minHeight: 140 , minWidth: 255 }); + tools.find('.om-icon.dweet').click(function(){ + dweet = OmUtil.tmpl("#wb-dweet"); Review comment: 1. `OmUtil.tmpl` accepts new id as second parameter 2. please use single quotes for strings ########## File path: openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js ########## @@ -369,6 +370,52 @@ var Wb = function() { minHeight: 140 , minWidth: 255 }); + tools.find('.om-icon.dweet').click(function(){ + dweet = OmUtil.tmpl("#wb-dweet"); + dweet[0].id='wb-dweet' + dweetIDCount++; Review comment: It is no clear why element ID should be different every time user role is changed ########## File path: openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml ########## @@ -960,4 +960,8 @@ see https://openmeetings.apache.org/LanguageEditor.html for Details <entry key="wizard.button.finish"><![CDATA[Finish]]></entry> <entry key="zoom.FULL_FIT"><![CDATA[Full-Fit]]></entry> <entry key="zoom.PAGE_WIDTH"><![CDATA[Page Width]]></entry> + <entry key="wb.tool.dweet"><![CDATA[Dweet IOT Messaging]]></entry> + <entry key="wb.tool.dweet.mything"><![CDATA[MyThing]]></entry> Review comment: It is not clear what `MyThing` should mean ########## File path: openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js ########## @@ -369,6 +370,52 @@ var Wb = function() { minHeight: 140 , minWidth: 255 }); + tools.find('.om-icon.dweet').click(function(){ + dweet = OmUtil.tmpl("#wb-dweet"); + dweet[0].id='wb-dweet' + dweetIDCount++; + dweet[0].style.bottom = '100px'; Review comment: styles should go to CSS ########## File path: openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js ########## @@ -369,6 +370,52 @@ var Wb = function() { minHeight: 140 , minWidth: 255 }); + tools.find('.om-icon.dweet').click(function(){ + dweet = OmUtil.tmpl("#wb-dweet"); + dweet[0].id='wb-dweet' + dweetIDCount++; + dweet[0].style.bottom = '100px'; + dweet[0].style.position= 'absolute'; + dweet[0].style[(Settings.isRtl ? 'left' : 'right')] = '100px'; Review comment: this `Settings.isRtl ? 'left' : 'right'` code is obsolete alignment will be changed automatically in case of RTL ########## File path: openmeetings-web/src/main/webapp/css/custom.css ########## @@ -1 +1,20 @@ /* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */ +.room-block .sb-wb .wb-block .tools .om-icon.big.dweet::before { Review comment: `custom.css` is for users OM CSS should go to correspondent `raw-*.css` files (most probably to `raw-wd.css`) ########## File path: openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/raw-wb-board.js ########## @@ -369,6 +370,52 @@ var Wb = function() { minHeight: 140 , minWidth: 255 }); + tools.find('.om-icon.dweet').click(function(){ + dweet = OmUtil.tmpl("#wb-dweet"); + dweet[0].id='wb-dweet' + dweetIDCount++; + dweet[0].style.bottom = '100px'; + dweet[0].style.position= 'absolute'; + dweet[0].style[(Settings.isRtl ? 'left' : 'right')] = '100px'; + dweet.find('.ui-dialog-titlebar-close').click(function() { + let id = $(this.parentElement).attr('id'); + $("#"+id).remove(); + }); + dweet.draggable({ + scroll: false + , handle: '.ui-dialog-titlebar' + , containment: 'body' + , start: function() { + if (!!$(this).css('bottom')) { + $(this).css('bottom', '').css(Settings.isRtl ? 'left' : 'right', ''); + } + } + , drag: function() { + if ($(this).position().x + $(this).width() >= $(this).parent().width()) { + return false; + } + } + }); + dweet.resizable({ + minHeight: 140 + , minWidth: 255 + }); + dweet.find('.update-btn').button().click(function() { + var id = $(this.parentElement.parentElement).attr('id'); Review comment: please use `let` or `const` instead of `var` ########## File path: openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/dweet-io.js ########## @@ -0,0 +1,520 @@ +// dweet.io.js +// http://dweet.io +// (c) 2014 Jim Heising and Bug Labs, Inc. +// dweet.io.js may be freely distributed under the MIT license. +(function () { + + var isNode = true; + + // Is this loading into node.js? + try { + isNode = (require); + } + catch (e) { + isNode = false; + } + + var io; + var request; + + var LAST_THING_NAME = "last-thing.dat"; + var DWEET_SERVER = "https://dweet.io:443"; Review comment: I doubt connection to external server will be allowed by CSP ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org