Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/animated-alerts into lp:openlp

2019-09-12 Thread Tim Bentley
Review: Needs Fixing

Looks good but the js stuff goes over my head!

One issue in alertsmanager and half done clean up.

Diff comments:

> 
> === modified file 'openlp/plugins/alerts/lib/alertsmanager.py'
> --- openlp/plugins/alerts/lib/alertsmanager.py2019-04-13 13:00:22 
> +
> +++ openlp/plugins/alerts/lib/alertsmanager.py2019-09-12 22:55:07 
> +
> @@ -83,8 +85,26 @@
> not Settings().value('core/display on 
> monitor')):
>  return
>  text = self.alert_list.pop(0)
> -alert_tab = self.parent().settings_tab
> -self.live_controller.displays[0].alert(text, alert_tab.location)
> +
> +# Get the rgb color format of the font & background hex colors from 
> settings
> +rgb_font_color = 
> self.hex_to_rgb(QtGui.QColor(Settings().value('alerts/font color')))
> +rgb_background_color = 
> self.hex_to_rgb(QtGui.QColor(Settings().value('alerts/background color')))
> +
> +# Put alert settings together in dict that will be passed to Display 
> in Javascript
> +alert_settings = {
> +'backgroundColor': rgb_background_color,
> +'location': Settings().value('alerts/location'),
> +'fontFace': Settings().value('alerts/font face'),
> +'fontSize': Settings().value('alerts/font size'),
> +'fontColor': rgb_font_color,
> +'timeout': Settings().value('alerts/timeout'),
> +'repeat': Settings().value('alerts/repeat'),
> +'scroll': Settings().value('alerts/scroll')
> +}
> +self.live_controller.displays[0].alert(text, 
> json.dumps(alert_settings))
> +# Check to see if we have a timer running.
> +# if self.timer_id == 0:
> +#self.timer_id = self.startTimer(int(alert_tab.timeout) * 1000)

Do we need this?  What is controlling the timing as we have a confusion here.
If the display is managing the timing then remove all the timer code please

>  
>  def timerEvent(self, event):
>  """


-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Passed

2019-09-12 Thread Raoul Snyman
Linting passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] macOS Test Results: Passed

2019-09-12 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-09-12 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] JavaScript Test Results: Passed

2019-09-12 Thread Raoul Snyman
JavaScript tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/animated-alerts into lp:openlp

2019-09-12 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/animated-alerts into 
lp:openlp.

Commit message:
Based on ic90's code, this just simplifies some of the code, and streamlines 
how things work, plus a couple of CSS fixes.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736

Based on ic90's code, this just simplifies some of the code, and streamlines 
how things work, plus a couple of CSS fixes.
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.
=== added file 'openlp/core/display/html/display.css'
--- openlp/core/display/html/display.css	1970-01-01 00:00:00 +
+++ openlp/core/display/html/display.css	2019-09-12 22:55:07 +
@@ -0,0 +1,90 @@
+@keyframes alert-scrolling-text {
+  0% {
+opacity: 1;
+transform: translateX(100%);
+  }
+  99% {
+opacity: 1;
+  }
+  100% {
+opacity: 0;
+transform: translateX(-101%);
+  }
+}
+
+body {
+  background: transparent !important;
+  color: rgb(255, 255, 255) !important;
+}
+
+sup {
+  vertical-align: super !important;
+  font-size: smaller !important;
+}
+
+.reveal .slides > section,
+.reveal .slides > section > section {
+  padding: 0;
+}
+
+.reveal > .backgrounds > .present {
+  visibility: hidden !important;
+}
+
+#global-background {
+  display: block;
+  visibility: visible;
+  z-index: -1;
+}
+
+.alert-container {
+  position: absolute;
+  display: flex;
+  flex-direction: row;
+  height: 100vh;
+  width: 100vw;
+}
+
+.hide {
+  opacity: 0 !important;
+  transition: opacity 0.5s ease;
+}
+
+.show {
+  opacity: 1 !important;
+  transition: opacity 0.5s ease;
+}
+
+.middle {
+  align-items: center;
+}
+
+.top {
+  align-items: flex-start;
+}
+
+.bottom {
+  align-items: flex-end;
+}
+
+#alert-background {
+  left: 0;
+  margin: 0;
+  opacity: 0;
+  overflow: hidden;
+  padding: 0.5em 0;
+  position: absolute;
+  transition: opacity 0.5s ease;
+  white-space: nowrap;
+  width: 100%;
+  z-index: 11;
+}
+
+#alert-text {
+  margin: 0 0.5em;
+  opacity: 0;
+  overflow: visible;
+  padding: 0;
+  transition: opacity 0.5s linear;
+  z-index: 100;
+}

=== modified file 'openlp/core/display/html/display.html'
--- openlp/core/display/html/display.html	2019-03-17 10:36:12 +
+++ openlp/core/display/html/display.html	2019-09-12 22:55:07 +
@@ -2,34 +2,16 @@
 
   
 Display Window
-
-
-body {
-  background: transparent !important;
-  color: rgb(255, 255, 255) !important;
-}
-sup {
-  vertical-align: super !important;
-  font-size: smaller !important;
-}
-.reveal .slides > section,
-.reveal .slides > section > section {
-  padding: 0;
-}
-.reveal > .backgrounds > .present {
-  visibility: hidden !important;
-}
-#global-background {
-  display: block;
-  visibility: visible;
-  z-index: -1;
-}
-
+
+
 
 
 
   
   
+
+  Testing alerts
+
 
   
   

=== modified file 'openlp/core/display/html/display.js'
--- openlp/core/display/html/display.js	2019-08-22 16:40:45 +
+++ openlp/core/display/html/display.js	2019-09-12 22:55:07 +
@@ -53,6 +53,50 @@
 };
 
 /**
+ * Transition state enumeration
+ */
+var TransitionState = {
+  EntranceTransition: "entranceTransition",
+  NoTransition: "noTransition",
+  ExitTransition: "exitTransition"
+};
+
+/**
+ * Animation state enumeration
+ */
+var AnimationState = {
+  NoAnimation: "noAnimation",
+  ScrollingText: "scrollingText",
+  NonScrollingText: "noScrollingText"
+};
+
+/**
+ * Alert location enumeration
+ */
+var AlertLocation = {
+  Top: 0,
+  Middle: 1,
+  Bottom: 2
+};
+
+/**
+ * Alert state enumeration
+ */
+var AlertState = {
+  Displaying: "displaying",
+  NotDisplaying: "notDisplaying"
+}
+
+/**
+ * Alert delay enumeration
+ */
+var AlertDelay = {
+  FiftyMilliseconds: 50,
+  OneSecond: 1000,
+  OnePointFiveSeconds: 1500
+}
+
+/**
  * Return an array of elements based on the selector query
  * @param {string} selector - The selector to find elements
  * @returns {array} An array of matching elements
@@ -118,6 +162,50 @@
 }
 
 /**
+ * Change a camelCaseString to a camel-case-string
+ * @private
+ * @param {string} text
+ * @returns {string} the Un-camel-case-ified string
+ */
+function _fromCamelCase(text) {
+  return text.replace(/([A-Z])/g, function (match, submatch) {
+return '-' + submatch.toLowerCase();
+  });
+}
+
+/**
+ * Create a CSS style
+ * @private
+ * @param {string} selector - The selector for this style
+ * @param {Object} rules - The rules to apply to the style
+ */
+function _createStyle(selector, rules) {
+  var id = selector.replace("#", "").replace(" .", "-").replace(".", "-").replace(" ", "_");
+  if ($("style#" + id).length != 0) {
+var style = $("style#" + id)[0];
+  }
+  else {
+var style = document.createElement("style");
+

[Openlp-core] [Merge] lp:~raoul-snyman/openlp/animated-alerts into lp:openlp

2019-09-12 Thread Raoul Snyman
The proposal to merge lp:~raoul-snyman/openlp/animated-alerts into lp:openlp 
has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372733
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Failed

2019-09-12 Thread Raoul Snyman
Linting failed, please see https://ci.openlp.io/job/MP-05-Linting/171/ for more 
details
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372733
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-09-12 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372733
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] macOS Test Results: Passed

2019-09-12 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372733
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] JavaScript Test Results: Passed

2019-09-12 Thread Raoul Snyman
JavaScript tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372733
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/animated-alerts into lp:openlp

2019-09-12 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/animated-alerts into 
lp:openlp.

Commit message:
Based on ic90's code, this just simplifies some of the code, and streamlines 
how things work, plus a couple of CSS fixes.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372733

Based on ic90's code, this just simplifies some of the code, and streamlines 
how things work, plus a couple of CSS fixes.
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/animated-alerts into lp:openlp.
=== added file 'openlp/core/display/html/display.css'
--- openlp/core/display/html/display.css	1970-01-01 00:00:00 +
+++ openlp/core/display/html/display.css	2019-09-12 22:43:33 +
@@ -0,0 +1,90 @@
+@keyframes alert-scrolling-text {
+  0% {
+opacity: 1;
+transform: translateX(100%);
+  }
+  99% {
+opacity: 1;
+  }
+  100% {
+opacity: 0;
+transform: translateX(-101%);
+  }
+}
+
+body {
+  background: transparent !important;
+  color: rgb(255, 255, 255) !important;
+}
+
+sup {
+  vertical-align: super !important;
+  font-size: smaller !important;
+}
+
+.reveal .slides > section,
+.reveal .slides > section > section {
+  padding: 0;
+}
+
+.reveal > .backgrounds > .present {
+  visibility: hidden !important;
+}
+
+#global-background {
+  display: block;
+  visibility: visible;
+  z-index: -1;
+}
+
+.alert-container {
+  position: absolute;
+  display: flex;
+  flex-direction: row;
+  height: 100vh;
+  width: 100vw;
+}
+
+.hide {
+  opacity: 0 !important;
+  transition: opacity 0.5s ease;
+}
+
+.show {
+  opacity: 1 !important;
+  transition: opacity 0.5s ease;
+}
+
+.middle {
+  align-items: center;
+}
+
+.top {
+  align-items: flex-start;
+}
+
+.bottom {
+  align-items: flex-end;
+}
+
+#alert-background {
+  left: 0;
+  margin: 0;
+  opacity: 0;
+  overflow: hidden;
+  padding: 0.5em 0;
+  position: absolute;
+  transition: opacity 0.5s ease;
+  white-space: nowrap;
+  width: 100%;
+  z-index: 11;
+}
+
+#alert-text {
+  margin: 0 0.5em;
+  opacity: 0;
+  overflow: visible;
+  padding: 0;
+  transition: opacity 0.5s linear;
+  z-index: 100;
+}

=== modified file 'openlp/core/display/html/display.html'
--- openlp/core/display/html/display.html	2019-03-17 10:36:12 +
+++ openlp/core/display/html/display.html	2019-09-12 22:43:33 +
@@ -2,34 +2,16 @@
 
   
 Display Window
-
-
-body {
-  background: transparent !important;
-  color: rgb(255, 255, 255) !important;
-}
-sup {
-  vertical-align: super !important;
-  font-size: smaller !important;
-}
-.reveal .slides > section,
-.reveal .slides > section > section {
-  padding: 0;
-}
-.reveal > .backgrounds > .present {
-  visibility: hidden !important;
-}
-#global-background {
-  display: block;
-  visibility: visible;
-  z-index: -1;
-}
-
+
+
 
 
 
   
   
+
+  Testing alerts
+
 
   
   

=== modified file 'openlp/core/display/html/display.js'
--- openlp/core/display/html/display.js	2019-08-22 16:40:45 +
+++ openlp/core/display/html/display.js	2019-09-12 22:43:33 +
@@ -53,6 +53,50 @@
 };
 
 /**
+ * Transition state enumeration
+ */
+var TransitionState = {
+  EntranceTransition: "entranceTransition",
+  NoTransition: "noTransition",
+  ExitTransition: "exitTransition"
+};
+
+/**
+ * Animation state enumeration
+ */
+var AnimationState = {
+  NoAnimation: "noAnimation",
+  ScrollingText: "scrollingText",
+  NonScrollingText: "noScrollingText"
+};
+
+/**
+ * Alert location enumeration
+ */
+var AlertLocation = {
+  Top: 0,
+  Middle: 1,
+  Bottom: 2
+};
+
+/**
+ * Alert state enumeration
+ */
+var AlertState = {
+  Displaying: "displaying",
+  NotDisplaying: "notDisplaying"
+}
+
+/**
+ * Alert delay enumeration
+ */
+var AlertDelay = {
+  FiftyMilliseconds: 50,
+  OneSecond: 1000,
+  OnePointFiveSeconds: 1500
+}
+
+/**
  * Return an array of elements based on the selector query
  * @param {string} selector - The selector to find elements
  * @returns {array} An array of matching elements
@@ -118,6 +162,50 @@
 }
 
 /**
+ * Change a camelCaseString to a camel-case-string
+ * @private
+ * @param {string} text
+ * @returns {string} the Un-camel-case-ified string
+ */
+function _fromCamelCase(text) {
+  return text.replace(/([A-Z])/g, function (match, submatch) {
+return '-' + submatch.toLowerCase();
+  });
+}
+
+/**
+ * Create a CSS style
+ * @private
+ * @param {string} selector - The selector for this style
+ * @param {Object} rules - The rules to apply to the style
+ */
+function _createStyle(selector, rules) {
+  var id = selector.replace("#", "").replace(" .", "-").replace(".", "-").replace(" ", "_");
+  if ($("style#" + id).length != 0) {
+var style = $("style#" + id)[0];
+  }
+  else {
+var style = document.createElement("style");
+

[Openlp-core] [Merge] lp:~raoul-snyman/openlp/fix-wait-for-threads-error into lp:openlp

2019-09-12 Thread noreply
The proposal to merge lp:~raoul-snyman/openlp/fix-wait-for-threads-error into 
lp:openlp has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/fix-wait-for-threads-error/+merge/372669
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/fix-wait-for-threads-error into lp:openlp

2019-09-12 Thread Tim Bentley
Review: Approve


-- 
https://code.launchpad.net/~raoul-snyman/openlp/fix-wait-for-threads-error/+merge/372669
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1843705] Re: Remote Live view web page does not scale right

2019-09-12 Thread Frank
PS Yes, all browsers support this.
https://caniuse.com/#search=max-height
https://caniuse.com/#search=max-width

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1843705

Title:
  Remote Live view web page does not scale right

Status in OpenLP:
  New

Bug description:
  Remote Live view web page does not scale right on vertical devices like 
mobile phones.
  on this page http://[your ip]:4316/main
  Can you change the css file?
  FROM
  .size {
  ...
  height: 100%;
  ...
  }

  TO

  .size {
  ...
  max-height: 100%;
  max-width: 100%;
  ...
  }
  I use Firefox(and chrome) on windows and on android

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1843705/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Bug 1843705] [NEW] Remote Live view web page does not scale right

2019-09-12 Thread Frank
Public bug reported:

Remote Live view web page does not scale right on vertical devices like mobile 
phones.
on this page http://[your ip]:4316/main
Can you change the css file?
FROM
.size {
...
height: 100%;
...
}

TO

.size {
...
max-height: 100%;
max-width: 100%;
...
}
I use Firefox(and chrome) on windows and on android

** Affects: openlp
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1843705

Title:
  Remote Live view web page does not scale right

Status in OpenLP:
  New

Bug description:
  Remote Live view web page does not scale right on vertical devices like 
mobile phones.
  on this page http://[your ip]:4316/main
  Can you change the css file?
  FROM
  .size {
  ...
  height: 100%;
  ...
  }

  TO

  .size {
  ...
  max-height: 100%;
  max-width: 100%;
  ...
  }
  I use Firefox(and chrome) on windows and on android

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1843705/+subscriptions

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp