Repository: openmeetings Updated Branches: refs/heads/master e56740519 -> 97edf43ea
[OPENMEETINGS-1714] more issues are fixed Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/97edf43e Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/97edf43e Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/97edf43e Branch: refs/heads/master Commit: 97edf43ea525ddab8fa7d539a2e9aaa4e3be22b6 Parents: e567405 Author: Maxim Solodovnik <[email protected]> Authored: Sat Oct 7 22:30:21 2017 +0700 Committer: Maxim Solodovnik <[email protected]> Committed: Sat Oct 7 22:30:21 2017 +0700 ---------------------------------------------------------------------- .../openmeetings/db/dao/label/LabelDao.java | 16 ++++---- .../openmeetings/db/dto/room/InvitationDTO.java | 13 ++---- .../java/org/apache/openmeetings/cli/Admin.java | 42 +++++++++++--------- .../openmeetings/cli/OmHelpFormatter.java | 2 +- .../screenshare/ScreenV1Encoder.java | 6 +-- .../apache/openmeetings/util/OmFileHelper.java | 24 +++++------ .../openmeetings/web/app/Application.java | 2 +- .../web/app/LabelResourceLoader.java | 2 +- .../org/apache/openmeetings/web/common/main.js | 2 +- .../openmeetings/web/room/wb/tool-shape.js | 2 +- .../openmeetings/web/room/wb/tool-text.js | 6 +-- .../apache/openmeetings/web/room/wb/wb-area.js | 4 +- 12 files changed, 61 insertions(+), 60 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/label/LabelDao.java ---------------------------------------------------------------------- diff --git a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/label/LabelDao.java b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/label/LabelDao.java index edb3377..e0296da 100644 --- a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/label/LabelDao.java +++ b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/label/LabelDao.java @@ -68,7 +68,7 @@ public class LabelDao implements IDataProviderDao<StringLabel>{ private static final LinkedHashMap<Long, Locale> languages = new LinkedHashMap<>(); private static final ConcurrentHashMap<Locale, List<StringLabel>> labelCache = new ConcurrentHashMap<>(); private static final Set<String> keys = new HashSet<>(); - private static Class<?> APP = null; + private static Class<?> appClass = null; private static void storeLanguages() throws Exception { Document d = XmlExport.createDocument(); @@ -98,11 +98,11 @@ public class LabelDao implements IDataProviderDao<StringLabel>{ } public static synchronized Class<?> getAppClass() throws ClassNotFoundException { - if (APP == null) { + if (appClass == null) { //FIXME HACK to resolve package dependencies - APP = Class.forName("org.apache.openmeetings.web.app.Application"); + appClass = Class.forName("org.apache.openmeetings.web.app.Application"); } - return APP; + return appClass; } public static void initLanguageMap() { @@ -142,13 +142,13 @@ public class LabelDao implements IDataProviderDao<StringLabel>{ for (StringLabel sl : labels) { r.addElement(ENTRY_ELEMENT).addAttribute(KEY_ATTR, sl.getKey()).addCDATA(sl.getValue()); } - URL u = APP.getResource(getLabelFileName(l)); + URL u = appClass.getResource(getLabelFileName(l)); XmlExport.toXml(new File(u.toURI()), d); } public static void upload(Locale l, InputStream is) throws Exception { List<StringLabel> labels = getLabels(is); - URL u = APP.getResource(getLabelFileName(Locale.ENGLISH)); //get the URL of existing resource + URL u = appClass.getResource(getLabelFileName(Locale.ENGLISH)); //get the URL of existing resource File el = new File(u.toURI()); File f = new File(el.getParentFile(), getLabelFileName(l)); if (!f.exists()) { @@ -160,7 +160,7 @@ public class LabelDao implements IDataProviderDao<StringLabel>{ private static List<StringLabel> getLabels(Locale l) { List<StringLabel> labels = new ArrayList<>(); - try (InputStream is = APP.getResourceAsStream(getLabelFileName(l))) { + try (InputStream is = appClass.getResourceAsStream(getLabelFileName(l))) { labels = getLabels(is); } catch (Exception e) { log.error("Error reading resources document", e); @@ -287,7 +287,7 @@ public class LabelDao implements IDataProviderDao<StringLabel>{ } labelCache.remove(l); try { - URL u = APP.getResource(getLabelFileName(l)); + URL u = appClass.getResource(getLabelFileName(l)); if (u != null) { File f = new File(u.toURI()); if (f.exists()) { http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/InvitationDTO.java ---------------------------------------------------------------------- diff --git a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/InvitationDTO.java b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/InvitationDTO.java index 31eb0ac..460a80b 100644 --- a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/InvitationDTO.java +++ b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/InvitationDTO.java @@ -22,7 +22,6 @@ import static org.apache.openmeetings.util.OpenmeetingsVariables.getWebAppRootKe import java.io.Serializable; import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.Date; import java.util.UUID; @@ -30,6 +29,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; +import org.apache.commons.lang3.time.FastDateFormat; import org.apache.openmeetings.db.dao.room.RoomDao; import org.apache.openmeetings.db.dao.user.UserDao; import org.apache.openmeetings.db.entity.room.Invitation; @@ -44,12 +44,7 @@ import org.slf4j.Logger; public class InvitationDTO implements Serializable { private static final long serialVersionUID = 1L; private static final Logger log = Red5LoggerFactory.getLogger(InvitationDTO.class, getWebAppRootKey()); - private static ThreadLocal<SimpleDateFormat> SDF = new ThreadLocal<SimpleDateFormat>() { - @Override - protected SimpleDateFormat initialValue() { - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - }; - }; + private static final FastDateFormat SDF = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss"); private String email; private String firstname; @@ -201,8 +196,8 @@ public class InvitationDTO implements Serializable { // valid period of Invitation switch (valid) { case Period: - i.setValidFrom(new Date(SDF.get().parse(validFrom).getTime() - (5 * 60 * 1000))); - i.setValidTo(SDF.get().parse(validTo)); + i.setValidFrom(new Date(SDF.parse(validFrom).getTime() - (5 * 60 * 1000))); + i.setValidTo(SDF.parse(validTo)); break; case Endless: case OneTime: http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java ---------------------------------------------------------------------- diff --git a/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java b/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java index 3a2e82a..9d2cdb0 100644 --- a/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java +++ b/openmeetings-install/src/main/java/org/apache/openmeetings/cli/Admin.java @@ -76,7 +76,7 @@ import org.springframework.scheduling.quartz.SchedulerFactoryBean; import org.springframework.web.context.WebApplicationContext; public class Admin { - private static final Logger log = Red5LoggerFactory.getLogger(Admin.class); + private static final Logger _log = Red5LoggerFactory.getLogger(Admin.class); public static final String RED5_HOME = "red5_home"; private boolean verbose = false; @@ -92,7 +92,7 @@ public class Admin { opts = buildOptions(); step = "Initialization"; if (!System.getProperties().containsKey("context")) { - System.out.println(String.format("System.property 'context' is not set, defaulting to %s", DEFAULT_CONTEXT_NAME)); + log(String.format("System.property 'context' is not set, defaulting to %s", DEFAULT_CONTEXT_NAME)); } String ctxName = System.getProperty("context", DEFAULT_CONTEXT_NAME); setWicketApplicationName(ctxName); @@ -100,6 +100,11 @@ public class Admin { OmFileHelper.setOmHome(new File(new File(home, "webapps"), ctxName)); } + private static void log(CharSequence msg) { + _log.info(msg.toString()); + System.out.println(msg); + } + private Options buildOptions() { Options options = new Options(); OptionGroup group = new OptionGroup() @@ -176,9 +181,9 @@ public class Admin { } if (verbose) { String msg = String.format("%s failed", step); - log.error(msg, e); + _log.error(msg, e); } else { - log.error("{} failed: {}", step, e.getMessage()); + _log.error("{} failed: {}", step, e.getMessage()); } if (_throw) { throw new ExitException(); @@ -208,7 +213,7 @@ public class Admin { try { cmdl = parser.parse(opts, args); } catch (ParseException e) { - System.out.println(e.getMessage()); + log(e.getMessage()); usage(); throw new ExitException(); } @@ -233,7 +238,7 @@ public class Admin { { step = "Install"; if (cmdl.hasOption("file") && (cmdl.hasOption("user") || cmdl.hasOption("email") || cmdl.hasOption("group"))) { - System.out.println("Please specify even 'file' option or 'admin user'."); + log("Please specify even 'file' option or 'admin user'."); throw new ExitException(); } boolean force = cmdl.hasOption("force"); @@ -302,7 +307,7 @@ public class Admin { if (!cmdl.hasOption("file")) { file = "backup_" + CalendarPatterns.getTimeForStreamId(new Date()) + ".zip"; f = new File(home, file); - System.out.println("File name was not specified, '" + file + "' will be used"); + log("File name was not specified, '" + file + "' will be used"); } else { f = new File(file); } @@ -325,19 +330,19 @@ public class Admin { step = "Files"; boolean cleanup = cmdl.hasOption("cleanup"); if (cleanup) { - System.out.println("WARNING: all intermediate files will be clean up!"); + log("WARNING: all intermediate files will be clean up!"); } StringBuilder report = new StringBuilder(); reportUploads(report, cleanup); reportStreams(report, cleanup); - System.out.println(report); + log(report); } break; case ldap: { step = "LDAP import"; if (!cmdl.hasOption("d")) { - System.out.println("Please specify LDAP domain Id."); + log("Please specify LDAP domain Id."); throw new ExitException(); } Long domainId = Long.valueOf(cmdl.getOptionValue('d')); @@ -414,16 +419,16 @@ public class Admin { cfg.setEmail(cmdl.getOptionValue("email")); cfg.setGroup(cmdl.getOptionValue("group")); if (cfg.getUsername() == null || cfg.getUsername().length() < USER_LOGIN_MINIMUM_LENGTH) { - System.out.println("User login was not provided, or too short, should be at least " + USER_LOGIN_MINIMUM_LENGTH + " character long."); + log("User login was not provided, or too short, should be at least " + USER_LOGIN_MINIMUM_LENGTH + " character long."); throw new ExitException(); } if (!MailUtil.isValid(cfg.getEmail())) { - System.out.println(String.format("Please provide non-empty valid email: '%s' is not valid.", cfg.getEmail())); + log(String.format("Please provide non-empty valid email: '%s' is not valid.", cfg.getEmail())); throw new ExitException(); } if (Strings.isEmpty(cfg.getGroup())) { - System.out.println(String.format("User group was not provided, or too short, should be at least 1 character long: %s", cfg.getGroup())); + log(String.format("User group was not provided, or too short, should be at least 1 character long: %s", cfg.getGroup())); throw new ExitException(); } if (cmdl.hasOption("password")) { @@ -436,7 +441,7 @@ public class Admin { passVal = new Validatable<>(cfg.getPassword()); passValidator.validate(passVal); if (!passVal.isValid()) { - System.out.print(String.format("Please enter password for the user '%s':", cfg.getUsername())); + log(String.format("Please enter password for the user '%s':", cfg.getUsername())); cfg.setPassword(new BufferedReader(new InputStreamReader(System.in, UTF_8)).readLine()); } } while (!passVal.isValid()); @@ -447,10 +452,10 @@ public class Admin { cfg.setTimeZone(tzMap.containsKey(tz) ? tz : null); } if (cfg.getTimeZone() == null) { - System.out.println("Please enter timezone, Possible timezones are:"); + log("Please enter timezone, Possible timezones are:"); for (Map.Entry<String,String> me : tzMap.entrySet()) { - System.out.println(String.format("%1$-25s%2$s", "\"" + me.getKey() + "\"", me.getValue())); + log(String.format("%1$-25s%2$s", "\"" + me.getKey() + "\"", me.getValue())); } throw new ExitException(); } @@ -508,7 +513,7 @@ public class Admin { private File checkRestoreFile(String file) { File backup = new File(file); if (!cmdl.hasOption("file") || !backup.exists() || !backup.isFile()) { - System.out.println("File should be specified, and point the existent zip file"); + log("File should be specified, and point the existent zip file"); usage(); throw new ExitException(); } @@ -527,10 +532,11 @@ public class Admin { try { a.process(args); - System.out.println("... Done"); + log("... Done"); } catch (ExitException e) { a.handleError(e, false, false); } catch (Exception e) { + _log.error("Unexpected error", e); e.printStackTrace(); System.exit(1); } http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-install/src/main/java/org/apache/openmeetings/cli/OmHelpFormatter.java ---------------------------------------------------------------------- diff --git a/openmeetings-install/src/main/java/org/apache/openmeetings/cli/OmHelpFormatter.java b/openmeetings-install/src/main/java/org/apache/openmeetings/cli/OmHelpFormatter.java index 89aaff9..c5da79b 100644 --- a/openmeetings-install/src/main/java/org/apache/openmeetings/cli/OmHelpFormatter.java +++ b/openmeetings-install/src/main/java/org/apache/openmeetings/cli/OmHelpFormatter.java @@ -33,7 +33,7 @@ import org.apache.commons.cli.OptionGroup; import org.apache.commons.cli.Options; public class OmHelpFormatter extends HelpFormatter { - private static String GENERAL_OPTION_GROUP = ""; + private static final String GENERAL_OPTION_GROUP = ""; private int maxPrefixLength = 0; @SuppressWarnings("unchecked") http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java ---------------------------------------------------------------------- diff --git a/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java b/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java index 58f91da..4b1e292 100644 --- a/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java +++ b/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java @@ -36,9 +36,9 @@ import org.red5.server.net.rtmp.event.VideoData; public class ScreenV1Encoder extends BaseScreenEncoder { private int[][] last = null; - private static int DEFAULT_BLOCK_SIZE = 32; - private static int DEFAULT_SCREEN_WIDTH = 1920; - private static int DEFAULT_SCREEN_HEIGHT = 1080; + private static final int DEFAULT_BLOCK_SIZE = 32; + private static final int DEFAULT_SCREEN_WIDTH = 1920; + private static final int DEFAULT_SCREEN_HEIGHT = 1080; private int keyFrameIndex; private int frameCount = 0; private int blockSize = DEFAULT_BLOCK_SIZE; http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java ---------------------------------------------------------------------- diff --git a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java index bdecf8f..d4138c2 100644 --- a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java +++ b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OmFileHelper.java @@ -28,7 +28,7 @@ public class OmFileHelper { /** * This variable needs to point to the openmeetings webapp directory */ - private static File OM_HOME = null; + private static File omHome = null; private static final String UPLOAD_DIR = "upload"; private static final String PUBLIC_DIR = "public"; private static final String CLIPARTS_DIR = "cliparts"; @@ -80,11 +80,11 @@ public class OmFileHelper { private OmFileHelper() {} public static void setOmHome(File omHome) { - OmFileHelper.OM_HOME = omHome; + OmFileHelper.omHome = omHome; } public static void setOmHome(String omHome) { - OmFileHelper.OM_HOME = new File(omHome); + OmFileHelper.omHome = new File(omHome); } public static File getRootDir() { @@ -93,7 +93,7 @@ public class OmFileHelper { } public static File getOmHome() { - return OmFileHelper.OM_HOME; + return OmFileHelper.omHome; } private static File getDir(File parent, String name) { @@ -105,7 +105,7 @@ public class OmFileHelper { } public static File getUploadDir() { - return new File(OmFileHelper.OM_HOME, UPLOAD_DIR); + return new File(OmFileHelper.omHome, UPLOAD_DIR); } public static File getUploadFilesDir() { @@ -174,7 +174,7 @@ public class OmFileHelper { } public static File getStreamsDir() { - return getDir(OmFileHelper.OM_HOME, STREAMS_DIR); + return getDir(OmFileHelper.omHome, STREAMS_DIR); } public static File getStreamsHibernateDir() { @@ -202,11 +202,11 @@ public class OmFileHelper { } public static File getLanguagesDir() { - return new File(OmFileHelper.OM_HOME, LANGUAGES_DIR); + return new File(OmFileHelper.omHome, LANGUAGES_DIR); } public static File getPublicDir() { - return new File(OmFileHelper.OM_HOME, PUBLIC_DIR); + return new File(OmFileHelper.omHome, PUBLIC_DIR); } public static File getPublicClipartsDir() { @@ -218,7 +218,7 @@ public class OmFileHelper { } public static File getWebinfDir() { - return new File(OmFileHelper.OM_HOME, WEB_INF_DIR); + return new File(OmFileHelper.omHome, WEB_INF_DIR); } public static File getPersistence() { @@ -234,15 +234,15 @@ public class OmFileHelper { } public static File getConfDir() { - return new File(OmFileHelper.OM_HOME, CONF_DIR); + return new File(OmFileHelper.omHome, CONF_DIR); } public static File getScreenSharingDir() { - return new File(OmFileHelper.OM_HOME, SCREENSHARING_DIR); + return new File(OmFileHelper.omHome, SCREENSHARING_DIR); } public static File getImagesDir() { - return new File(OmFileHelper.OM_HOME, IMAGES_DIR); + return new File(OmFileHelper.omHome, IMAGES_DIR); } public static File appendSuffix(File original, String suffix) { http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java index dd9f997..23df3f7 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java @@ -156,7 +156,7 @@ public class Application extends AuthenticatedWebApplication implements IApplica public static final String NAME_ATTR_KEY = "name"; //additional maps for faster searching should be created private DashboardContext dashboardContext; - private static Set<String> STRINGS_WITH_APP = new HashSet<>(); //FIXME need to be removed + private static final Set<String> STRINGS_WITH_APP = new HashSet<>(); //FIXME need to be removed private static String appName; static { STRINGS_WITH_APP.addAll(Arrays.asList("499", "500", "506", "511", "512", "513", "517", "532", "622", "widget.start.desc" http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/LabelResourceLoader.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/LabelResourceLoader.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/LabelResourceLoader.java index 7005f09..aa441d9 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/LabelResourceLoader.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/LabelResourceLoader.java @@ -32,7 +32,7 @@ import org.apache.wicket.resource.loader.IStringResourceLoader; * */ public class LabelResourceLoader implements IStringResourceLoader { - private static Map<String, String> STRING_LABEL_MAPPING = new HashMap<>(); + private static final Map<String, String> STRING_LABEL_MAPPING = new HashMap<>(); static { STRING_LABEL_MAPPING.put("PagingNavigator.first", "goto.first"); http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/main.js ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/main.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/main.js index d869ba2..e9f00fb 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/main.js +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/main.js @@ -5,7 +5,7 @@ Wicket.BrowserInfo.collectExtraInfo = function(info) { info.settings = JSON.stringify(getSettings()); }; function getSettings() { - let s = localStorage.getItem("openmeetings"); + const s = localStorage.getItem("openmeetings"); if (!!s) { s = JSON.parse(s); } http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-shape.js ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-shape.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-shape.js index 901c073..cde5b89 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-shape.js +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-shape.js @@ -1,6 +1,6 @@ /* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */ var Shape = function(wb) { - let shape = ShapeBase(wb); + const shape = ShapeBase(wb); shape.obj = null; shape.isDown = false; shape.orig = {x: 0, y: 0}; http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-text.js ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-text.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-text.js index c24b72a..a81126b 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-text.js +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/tool-text.js @@ -9,7 +9,7 @@ var Text = function(wb, s) { //TODO font size, background color text.mouseDown = function(o) { - let canvas = this + const canvas = this , pointer = canvas.getPointer(o.e) , ao = canvas.getActiveObject(); if (!!ao && ao.type === 'i-text') { @@ -45,13 +45,13 @@ var Text = function(wb, s) { }); }); text.enableAllProps(s); - let b = s.find('.wb-prop-b').button("enable"); + const b = s.find('.wb-prop-b').button("enable"); if (text.style.bold) { b.addClass('ui-state-active selected'); } else { b.removeClass('ui-state-active selected'); } - let i = s.find('.wb-prop-i').button("enable"); + const i = s.find('.wb-prop-i').button("enable"); if (text.style.italic) { i.addClass('ui-state-active selected'); } else { http://git-wip-us.apache.org/repos/asf/openmeetings/blob/97edf43e/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js index 37879b4..6ad02f7 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb-area.js @@ -9,9 +9,9 @@ var WbArea = (function() { tabs.tabs("refresh").find('ul').removeClass('ui-corner-all').removeClass('ui-widget-header'); } function getActive() { - let idx = tabs.tabs("option", 'active'); + const idx = tabs.tabs("option", 'active'); if (idx > -1) { - let href = tabs.find('a')[idx]; + const href = tabs.find('a')[idx]; if (!!href) { return $($(href).attr('href')); }
