You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2017/02/02 10:03:16 UTC
svn commit: r1781363 [2/2] - in /openmeetings/application: branches/3.2.x/
branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/backup/
branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/
b...
Added: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.js
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.js?rev=1781363&view=auto
==============================================================================
--- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.js (added)
+++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.js Thu Feb 2 10:03:15 2017
@@ -0,0 +1,125 @@
+/*
+ * jQuery CSSEmoticons plugin 0.2.9
+ *
+ * Copyright (c) 2010 Steve Schwartz (JangoSteve)
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Date: Sun Oct 22 1:00:00 2010 -0500
+ */
+var CSSEmoticon = function() {
+ this.escapeCharacters = [")", "(", "*", "[", "]", "{", "}", "|", "^", "<", ">", "\\", "?", "+", "=", "."];
+
+ this.threeCharacterEmoticons = [
+ ":-)", ":o)", ":c)", ":^)", ":-D", ":-(", ":-9", ";-)", ":-P", ":-p", ":-Þ", ":-b", ":-O", ":-/", ":-X", ":-#", ":'(", "B-)", "8-)", ";*(", ":-*", ":-\\",
+ "?-)" // <== This is my own invention, it's a smiling pirate (with an eye-patch)!
+ ];
+
+ this.twoCharacterEmoticons = [ // separate these out so that we can add a letter-spacing between the characters for better proportions
+ ":)", ":]", "=]", "=)", "8)", ":}", ":D", ":(", ":[", ":{", "=(", ";)", ";]", ";D", ":P", ":p", "=P", "=p", ":b", ":Þ", ":O", ":/", "=/", ":S", ":#", ":X", "B)", ":|", ":\\", "=\\", ":*", ":>", ":<"
+ ];
+
+ this.specialEmoticons = { // emoticons to be treated with a special class, hash specifies the additional class to add, along with standard css-emoticon class
+ ">:)": {cssClass: "red-emoticon small-emoticon spaced-emoticon"},
+ ">;)": {cssClass: "red-emoticon small-emoticon spaced-emoticon"},
+ ">:(": {cssClass: "red-emoticon small-emoticon spaced-emoticon"},
+ ">: )": {cssClass: "red-emoticon small-emoticon"},
+ ">; )": {cssClass: "red-emoticon small-emoticon"},
+ ">: (": {cssClass: "red-emoticon small-emoticon"},
+ ";(": {cssClass: "red-emoticon spaced-emoticon"},
+ "<3": {cssClass: "pink-emoticon counter-rotated"},
+ "O_O": {cssClass: "no-rotate"},
+ "o_o": {cssClass: "no-rotate"},
+ "0_o": {cssClass: "no-rotate"},
+ "O_o": {cssClass: "no-rotate"},
+ "T_T": {cssClass: "no-rotate"},
+ "^_^": {cssClass: "no-rotate"},
+ "O:)": {cssClass: "small-emoticon spaced-emoticon"},
+ "O: )": {cssClass: "small-emoticon"},
+ "8D": {cssClass: "small-emoticon spaced-emoticon"},
+ "XD": {cssClass: "small-emoticon spaced-emoticon"},
+ "xD": {cssClass: "small-emoticon spaced-emoticon"},
+ "=D": {cssClass: "small-emoticon spaced-emoticon"},
+ "8O": {cssClass: "small-emoticon spaced-emoticon"},
+ "[+=..]": {cssClass: "no-rotate nintendo-controller"}
+ };
+
+ var specialRegex = new RegExp('(\\' + this.escapeCharacters.join('|\\') + ')', 'g');
+ // One of these characters must be present before the matched emoticon, or the matched emoticon must be the first character in the container HTML
+ // This is to ensure that the characters in the middle of HTML properties or URLs are not matched as emoticons
+ // Below matches ^ (first character in container HTML), \s (whitespace like space or tab), or \0 (NULL character)
+ // (<\\S+.*>) matches <\\S+.*> (matches an HTML tag like <span> or <div>), but haven't quite gotten it working yet, need to push this fix now
+ var preMatch = '(^|[\\s\\0])';
+
+ for (var i = this.threeCharacterEmoticons.length - 1; i >= 0; --i) {
+ this.threeCharacterEmoticons[i] = this.threeCharacterEmoticons[i].replace(specialRegex, '\\$1');
+ this.threeCharacterEmoticons[i] = new RegExp(preMatch + '(' + this.threeCharacterEmoticons[i] + ')', 'g');
+ }
+
+ for (var i = this.twoCharacterEmoticons.length - 1; i >= 0; --i) {
+ this.twoCharacterEmoticons[i] = this.twoCharacterEmoticons[i].replace(specialRegex, '\\$1');
+ this.twoCharacterEmoticons[i] = new RegExp(preMatch + '(' + this.twoCharacterEmoticons[i] + ')', 'g');
+ }
+
+ for (var emoticon in this.specialEmoticons) {
+ this.specialEmoticons[emoticon].regexp = emoticon.replace(specialRegex, '\\$1');
+ this.specialEmoticons[emoticon].regexp = new RegExp(preMatch + '(' + this.specialEmoticons[emoticon].regexp + ')', 'g');
+ }
+
+ this.defaults = {animate: true, delay: 500, exclude: 'pre,code,.no-emoticons'}
+};
+
+CSSEmoticon.prototype.emoticonize = function (str, options) {
+ // $.extend({}, this.defaults, options);
+ var opts = {};
+
+ for (var key in this.defaults) {
+ opts[key] = this.defaults[key];
+ }
+
+ for (var key in options) {
+ opts[key] = options[key];
+ }
+
+ var exclude = 'span.css-emoticon';
+ if (opts.exclude) {
+ exclude += ',' + opts.exclude;
+ }
+ var excludeArray = exclude.split(',');
+
+ var cssClass = 'css-emoticon';
+ if (opts.animate) {
+ cssClass += ' un-transformed-emoticon animated-emoticon';
+ }
+
+ for (var emoticon in this.specialEmoticons) {
+ var specialCssClass = cssClass + " " + this.specialEmoticons[emoticon].cssClass;
+ str = str.replace(this.specialEmoticons[emoticon].regexp, "$1<span class='" + specialCssClass + "'>$2</span>");
+ }
+
+ for (var key in this.threeCharacterEmoticons) {
+ var regexp = this.threeCharacterEmoticons[key];
+ str = str.replace(regexp, "$1<span class='" + cssClass + "'>$2</span>");
+ }
+
+ for (var key in this.twoCharacterEmoticons) {
+ var regexp = this.twoCharacterEmoticons[key];
+ str = str.replace(regexp, "$1<span class='" + cssClass + " spaced-emoticon'>$2</span>");
+ }
+
+ // animate emoticons
+ if (opts.animate) {
+ setTimeout(function () {
+ var untransformed = document.body.getElementsByClassName("un-transformed-emoticon");
+ for(var key in untransformed) {
+ if(typeof untransformed[key] == "object") {
+ untransformed[key].classList.remove("un-transformed-emoticon");
+ }
+ }
+ }, opts.delay);
+ }
+
+ return str;
+};
Added: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.min.js
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.min.js?rev=1781363&view=auto
==============================================================================
--- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.min.js (added)
+++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/cssemoticons.min.js Thu Feb 2 10:03:15 2017
@@ -0,0 +1,2 @@
+/* Dual licensed under the MIT and GPL licenses */
+var CSSEmoticon=function(){this.escapeCharacters=[")","(","*","[","]","{","}","|","^","<",">","\\","?","+","=","."];this.threeCharacterEmoticons=[":-)",":o)",":c)",":^)",":-D",":-(",":-9",";-)",":-P",":-p",":-Þ",":-b",":-O",":-/",":-X",":-#",":'(","B-)","8-)",";*(",":-*",":-\\","?-)"];this.twoCharacterEmoticons=[":)",":]","=]","=)","8)",":}",":D",":(",":[",":{","=(",";)",";]",";D",":P",":p","=P","=p",":b",":Þ",":O",":/","=/",":S",":#",":X","B)",":|",":\\","=\\",":*",":>",":<"];this.specialEmoticons={">:)":{cssClass:"red-emoticon small-emoticon spaced-emoticon"},">;)":{cssClass:"red-emoticon small-emoticon spaced-emoticon"},">:(":{cssClass:"red-emoticon small-emoticon spaced-emoticon"},">: )":{cssClass:"red-emoticon small-emoticon"},">; )":{cssClass:"red-emoticon small-emoticon"},">: (":{cssClass:"red-emoticon small-emoticon"},";(":{cssClass:"red-emoticon spaced-emoticon"},"<3":{cssClass:"pink-emoticon counter-rotated"},"O_O":{cssClass:"no-rotate"},"o
_o":{cssClass:"no-rotate"},"0_o":{cssClass:"no-rotate"},"O_o":{cssClass:"no-rotate"},"T_T":{cssClass:"no-rotate"},"^_^":{cssClass:"no-rotate"},"O:)":{cssClass:"small-emoticon spaced-emoticon"},"O: )":{cssClass:"small-emoticon"},"8D":{cssClass:"small-emoticon spaced-emoticon"},"XD":{cssClass:"small-emoticon spaced-emoticon"},"xD":{cssClass:"small-emoticon spaced-emoticon"},"=D":{cssClass:"small-emoticon spaced-emoticon"},"8O":{cssClass:"small-emoticon spaced-emoticon"},"[+=..]":{cssClass:"no-rotate nintendo-controller"}};var a=new RegExp('(\\'+this.escapeCharacters.join('|\\')+')','g');var b='(^|[\\s\\0])';for(var c=this.threeCharacterEmoticons.length-1;c>=0;--c){this.threeCharacterEmoticons[c]=this.threeCharacterEmoticons[c].replace(a,'\\$1');this.threeCharacterEmoticons[c]=new RegExp(b+'('+this.threeCharacterEmoticons[c]+')','g');}for(var c=this.twoCharacterEmoticons.length-1;c>=0;--c){this.twoCharacterEmoticons[c]=this.twoCharacterEmoticons[c].replace(a,'\\$1');this.twoCharacterEm
oticons[c]=new RegExp(b+'('+this.twoCharacterEmoticons[c]+')','g');}for(var d in this.specialEmoticons){this.specialEmoticons[d].regexp=d.replace(a,'\\$1');this.specialEmoticons[d].regexp=new RegExp(b+'('+this.specialEmoticons[d].regexp+')','g');}this.defaults={animate:true,delay:500,exclude:'pre,code,.no-emoticons'};};CSSEmoticon.prototype.emoticonize=function(a,b){var c={};for(var d in this.defaults)c[d]=this.defaults[d];for(var d in b)c[d]=b[d];var e='span.css-emoticon';if(c.exclude)e+=','+c.exclude;var f=e.split(',');var g='css-emoticon';if(c.animate)g+=' un-transformed-emoticon animated-emoticon';for(var h in this.specialEmoticons){var i=g+" "+this.specialEmoticons[h].cssClass;a=a.replace(this.specialEmoticons[h].regexp,"$1<span class='"+i+"'>$2</span>");}for(var d in this.threeCharacterEmoticons){var j=this.threeCharacterEmoticons[d];a=a.replace(j,"$1<span class='"+g+"'>$2</span>");}for(var d in this.twoCharacterEmoticons){var j=this.twoCharacterEmoticons[d];a=a.replace(j,"$1<
span class='"+g+" spaced-emoticon'>$2</span>");}if(c.animate)setTimeout(function(){var a=document.body.getElementsByClassName("un-transformed-emoticon");for(var b in a)if(typeof a[b]=="object")a[b].classList.remove("un-transformed-emoticon");},c.delay);return a;};
\ No newline at end of file
Copied: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/upload/BootstrapFileUploadBehavior.java (from r1781362, openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/BootstrapFileUploadBehavior.java)
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/upload/BootstrapFileUploadBehavior.java?p2=openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/upload/BootstrapFileUploadBehavior.java&p1=openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/BootstrapFileUploadBehavior.java&r1=1781362&r2=1781363&rev=1781363&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/BootstrapFileUploadBehavior.java (original)
+++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/upload/BootstrapFileUploadBehavior.java Thu Feb 2 10:03:15 2017
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.openmeetings.web.util;
+package org.apache.openmeetings.web.util.upload;
import org.apache.wicket.Component;
import org.apache.wicket.behavior.Behavior;
Modified: openmeetings/application/trunk/pom.xml
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/pom.xml?rev=1781363&r1=1781362&r2=1781363&view=diff
==============================================================================
--- openmeetings/application/trunk/pom.xml (original)
+++ openmeetings/application/trunk/pom.xml Thu Feb 2 10:03:15 2017
@@ -913,6 +913,7 @@
<patterns>
<pattern>Licensed MIT</pattern>
<pattern>MIT/GPL2 Licensed</pattern>
+ <pattern>licensed under the MIT and GPL</pattern>
</patterns>
</license>
</licenses>