soocrate-core
Version:
this is the core of soocrate application
1,387 lines • 61.7 kB
JSON
[
{
"__docId__": 1,
"kind": "external",
"name": "Infinity",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Infinity",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 2,
"kind": "external",
"name": "NaN",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~NaN",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 3,
"kind": "external",
"name": "undefined",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~undefined",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 4,
"kind": "external",
"name": "null",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~null",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 5,
"kind": "external",
"name": "Object",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Object",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 6,
"kind": "external",
"name": "object",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~object",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 7,
"kind": "external",
"name": "Function",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Function",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 8,
"kind": "external",
"name": "function",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~function",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 9,
"kind": "external",
"name": "Boolean",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Boolean",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 10,
"kind": "external",
"name": "boolean",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~boolean",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 11,
"kind": "external",
"name": "Symbol",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Symbol",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 12,
"kind": "external",
"name": "Error",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Error",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 13,
"kind": "external",
"name": "EvalError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~EvalError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 14,
"kind": "external",
"name": "InternalError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~InternalError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 15,
"kind": "external",
"name": "RangeError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~RangeError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 16,
"kind": "external",
"name": "ReferenceError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~ReferenceError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 17,
"kind": "external",
"name": "SyntaxError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~SyntaxError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 18,
"kind": "external",
"name": "TypeError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~TypeError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 19,
"kind": "external",
"name": "URIError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~URIError",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 20,
"kind": "external",
"name": "Number",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Number",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 21,
"kind": "external",
"name": "number",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~number",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 22,
"kind": "external",
"name": "Date",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Date",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 23,
"kind": "external",
"name": "String",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~String",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 24,
"kind": "external",
"name": "string",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~string",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 25,
"kind": "external",
"name": "RegExp",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~RegExp",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 26,
"kind": "external",
"name": "Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 27,
"kind": "external",
"name": "Int8Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Int8Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 28,
"kind": "external",
"name": "Uint8Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Uint8Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 29,
"kind": "external",
"name": "Uint8ClampedArray",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Uint8ClampedArray",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 30,
"kind": "external",
"name": "Int16Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Int16Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 31,
"kind": "external",
"name": "Uint16Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Uint16Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 32,
"kind": "external",
"name": "Int32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Int32Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 33,
"kind": "external",
"name": "Uint32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Uint32Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 34,
"kind": "external",
"name": "Float32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Float32Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 35,
"kind": "external",
"name": "Float64Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Float64Array",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 36,
"kind": "external",
"name": "Map",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Map",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 37,
"kind": "external",
"name": "Set",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Set",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 38,
"kind": "external",
"name": "WeakMap",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~WeakMap",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 39,
"kind": "external",
"name": "WeakSet",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~WeakSet",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 40,
"kind": "external",
"name": "ArrayBuffer",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~ArrayBuffer",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 41,
"kind": "external",
"name": "DataView",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~DataView",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 42,
"kind": "external",
"name": "JSON",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~JSON",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 43,
"kind": "external",
"name": "Promise",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Promise",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 44,
"kind": "external",
"name": "Generator",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Generator",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 45,
"kind": "external",
"name": "GeneratorFunction",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~GeneratorFunction",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 46,
"kind": "external",
"name": "Reflect",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Reflect",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 47,
"kind": "external",
"name": "Proxy",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
"memberof": "view/.external-ecmascript.js",
"static": true,
"longname": "view/.external-ecmascript.js~Proxy",
"access": "public",
"description": "",
"builtinExternal": true
},
{
"__docId__": 48,
"kind": "file",
"name": "view/editor.js",
"content": "function Editor(id, sessionID) {\r\n\tjQuery(\"#editor\").attr('id', 'crate-' + id);\r\n\tthis.editor = quill;\r\n\r\n\t// Initilise the the editor content \r\n\t//this.editor.setText('');\r\n\tif (store.get(\"CRATE2-\" + sessionID)) {\r\n\t\tvar doc = store.get(\"CRATE2-\" + sessionID);\r\n\t\tthis.editor.setContents(doc.delta, \"user\");\r\n\t\tjQuery(\"#title\").text(doc.title);\r\n\t}\r\n\r\n\r\n\t// make title editable\r\n\tjQuery('#title').click(function() {\r\n\t\tjQuery('#title').attr('contenteditable', 'true');\r\n\t});\r\n\r\n\r\n};\r\n\r\n\r\nmodule.exports = Editor;",
"static": true,
"longname": "C:/Users/haouari-n/Desktop/CrateV2/jquery-crate/lib/view/editor.js",
"access": "public",
"description": null,
"lineNumber": 1
},
{
"__docId__": 49,
"kind": "function",
"name": "Editor",
"memberof": "view/editor.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/editor.js~Editor",
"access": "public",
"export": true,
"importPath": "jquery-crate/view/editor.js",
"importStyle": "Editor",
"description": null,
"lineNumber": 1,
"undocument": true,
"params": [
{
"name": "id",
"types": [
"*"
]
},
{
"name": "sessionID",
"types": [
"*"
]
}
],
"return": null
},
{
"__docId__": 50,
"kind": "file",
"name": "view/link.js",
"content": "\r\nfunction LinkView(container, id){\r\n\r\n this.linkContainer = jQuery('<div>').appendTo(container)\r\n .css('position', 'relative')\r\n .css('top', '0px')\r\n .css('width', '60%')\r\n .css('z-index', '0')\r\n .css('opacity', '0.9')\r\n .attr('id','linkContainer')\r\n .hide();\r\n \r\n // #0 qr code modal\r\n var qrCodeModal = jQuery('<div>').appendTo(container)\r\n .attr('id', 'modalQRCode'+id)\r\n .attr('tabindex','-1')\r\n .attr('role','dialog')\r\n .attr('aria-labelledby','modalQRCodeLabel')\r\n .attr('aria-hidden', 'true')\r\n .addClass('modal');\r\n \r\n var qrCodeModalDialog = jQuery('<div>').appendTo(qrCodeModal)\r\n .addClass('modal-dialog');\r\n var qrCodeModalContent = jQuery('<div>').appendTo(qrCodeModalDialog)\r\n .addClass('modal-content text-center');\r\n this.qrcodeCanvas = jQuery('<div>');\r\n qrCodeModalContent.append(jQuery('<br>'))\r\n .append(this.qrcodeCanvas)\r\n .append(jQuery('<br>'));\r\n \r\n // #1 overall division\r\n this.alert = jQuery('<div>').appendTo(this.linkContainer);\r\n // #2 cross to close the division\r\n this.dismiss = jQuery('<button>').appendTo(this.alert)\r\n .attr('type', 'button')\r\n .addClass('close')\r\n .html('<span aria-hidden=\"true\">×</span><span class=\"sr-only\"> '+\r\n 'Close </span>');\r\n var rowContainer = jQuery('<div>').appendTo(this.alert)\r\n .addClass('container');\r\n var inputGroup = jQuery('<div>').appendTo(rowContainer)\r\n .addClass('input-group')\r\n .attr('style','margin-left: -16px;');\r\n this.input = jQuery('<input>').appendTo(inputGroup)\r\n .attr('type', 'text')\r\n .attr('id', 'sessionUrl')\r\n .attr('placeholder', 'Nothing to see here, move along.')\r\n .addClass('form-control');\r\n \r\n var inputGroup2 = jQuery('<span>').appendTo(inputGroup)\r\n .addClass('input-group-btn');\r\n\r\n this.qrcode = jQuery('<button>').appendTo(inputGroup2)\r\n .attr('aria-label', 'QR-code')\r\n .attr('type', 'button')\r\n .attr('data-target', '#modalQRCode'+id)\r\n .attr('data-toggle', 'modal')\r\n .addClass('btn btn-default')\r\n .html('<i class=\"fa fa-qrcode\"></i> QR-Code');\r\n\r\n this.action = jQuery('<button id=\"copyButton\">').appendTo(inputGroup2)\r\n .attr('aria-label', 'Go!')\r\n .attr('type', 'button')\r\n .addClass('btn btn-default')\r\n .html('Go!')\r\n .css('z-index', '15');\r\n\r\n var self = this;\r\n this.dismiss.unbind(\"click\").click(function(){self.linkContainer.hide();});\r\n};\r\n\r\nLinkView.prototype.printLink = function(link){\r\n this.linkContainer.show();\r\n this.action.html('<i class=\"fa fa-clipboard\"></i> Copy');\r\n this.action.attr(\"aria-label\", \"Copy to clipboard\");\r\n this.input.attr(\"readonly\",\"readonly\");\r\n this.input.val(link);\r\n this.qrcode.show();\r\n};\r\n\r\n\r\nLinkView.prototype.printLaunchLink = function(link){\r\n this.printLink(link);\r\n this.input.attr(\"placeholder\",\r\n \"A link will appear in this field, give it to your \"+\r\n \"friend!\");\r\n this.action.unbind(\"click\");\r\n this.qrcode.hide();\r\n return this.action;\r\n};\r\n\r\nLinkView.prototype.printAnswerLink = function(link){\r\n this.printLink(link);\r\n this.input.attr(\"placeholder\",\r\n \"A link will appear in this field. Please give it \"+\r\n \"back to your friend.\");\r\n this.action.unbind(\"click\");\r\n this.qrcode.hide();\r\n return this.action;\r\n};\r\n\r\nLinkView.prototype.askLink = function(){\r\n this.linkContainer.show();\r\n this.alert.removeClass(\"alert-warning\").addClass(\"alert-info\");\r\n this.action.html('Go!');\r\n this.action.attr(\"aria-label\", \"Stamp the ticket\");\r\n this.input.removeAttr(\"readonly\");\r\n this.input.val(\"\");\r\n this.action.unbind(\"click\");\r\n this.qrcode.hide();\r\n};\r\n\r\nLinkView.prototype.askLaunchLink = function(){\r\n this.askLink();\r\n this.input.attr(\"placeholder\",\r\n \"Please, copy the ticket of your friend here to stamp \"+\r\n \"it!\");\r\n this.qrcode.hide();\r\n return this.action;\r\n};\r\n\r\nLinkView.prototype.askAnswerLink = function(){\r\n this.askLink();\r\n this.input.attr(\"placeholder\", \"Copy the stamped ticket to confirm \"+\r\n \"your arrival in the network\");\r\n this.qrcode.hide();\r\n return this.action;\r\n};\r\n\r\nLinkView.prototype.hide = function(){\r\n this.linkContainer.hide();\r\n};\r\n\r\n\r\n\r\nmodule.exports = LinkView;\r\n",
"static": true,
"longname": "C:/Users/haouari-n/Desktop/CrateV2/jquery-crate/lib/view/link.js",
"access": "public",
"description": null,
"lineNumber": 1
},
{
"__docId__": 51,
"kind": "function",
"name": "printLink",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~printLink",
"access": "public",
"export": false,
"importPath": "jquery-crate/view/link.js",
"importStyle": null,
"description": null,
"lineNumber": 72,
"undocument": true,
"params": [
{
"name": "link",
"types": [
"*"
]
}
],
"return": null,
"ignore": true
},
{
"__docId__": 52,
"kind": "function",
"name": "printLaunchLink",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~printLaunchLink",
"access": "public",
"export": false,
"importPath": "jquery-crate/view/link.js",
"importStyle": null,
"description": null,
"lineNumber": 82,
"undocument": true,
"params": [
{
"name": "link",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"ignore": true
},
{
"__docId__": 53,
"kind": "function",
"name": "printAnswerLink",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~printAnswerLink",
"access": "public",
"export": false,
"importPath": "jquery-crate/view/link.js",
"importStyle": null,
"description": null,
"lineNumber": 92,
"undocument": true,
"params": [
{
"name": "link",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"ignore": true
},
{
"__docId__": 54,
"kind": "function",
"name": "askLink",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~askLink",
"access": "public",
"export": false,
"importPath": "jquery-crate/view/link.js",
"importStyle": null,
"description": null,
"lineNumber": 102,
"undocument": true,
"params": [],
"return": null,
"ignore": true
},
{
"__docId__": 55,
"kind": "function",
"name": "askLaunchLink",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~askLaunchLink",
"access": "public",
"export": false,
"importPath": "jquery-crate/view/link.js",
"importStyle": null,
"description": null,
"lineNumber": 113,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"ignore": true
},
{
"__docId__": 56,
"kind": "function",
"name": "askAnswerLink",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~askAnswerLink",
"access": "public",
"export": false,
"importPath": "jquery-crate/view/link.js",
"importStyle": null,
"description": null,
"lineNumber": 122,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"ignore": true
},
{
"__docId__": 57,
"kind": "function",
"name": "hide",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~hide",
"access": "public",
"export": false,
"importPath": "jquery-crate/view/link.js",
"importStyle": null,
"description": null,
"lineNumber": 130,
"undocument": true,
"params": [],
"return": null,
"ignore": true
},
{
"__docId__": 58,
"kind": "function",
"name": "LinkView",
"memberof": "view/link.js",
"generator": false,
"async": false,
"static": true,
"longname": "view/link.js~LinkView",
"access": "public",
"export": true,
"importPath": "jquery-crate/view/link.js",
"importStyle": "LinkView",
"description": null,
"lineNumber": 2,
"undocument": true,
"params": [
{
"name": "container",
"types": [
"*"
]
},
{
"name": "id",
"types": [
"*"
]
}
],
"return": null
},
{
"__docId__": 59,
"kind": "file",
"name": "view/marker.js",
"content": "const animals = require('animals');\r\nconst hash = require('string-hash');\r\n\r\n\r\n\r\n/**\r\n * Marker is class for managing the marker of one user,it includes the caret, avatar, and pseudo Names.\r\n */\r\n\r\nclass Marker {\r\n /**\r\n * Marker Module manages the Carets, avatars, pseudo names for the different users of the document\r\n * @param {[string]} origin the id of the the user\r\n * @param {Number} lifeTime After this time, if no ping or Caret position is received => \r\n * remove caret and avatar. if lifetime is -1 we didn't add the avatar\r\n * @param {[{index: index,length: 0}]} range range stars from index with the specified length\r\n * @param {[cursor module]} cursorsp the used cursor module for quilljs\r\n * @param {[Boolean]} cursor create the caret or not. If it is from ping, it will be false else true\r\n * @param {Boolean} isItME is it my caret ? true or false to disable the time if it is true\r\n */\r\n constructor(origin, lifeTime = -1, range, cursorsp, cursor, isItME = false) {\r\n /**\r\n * origin the id of the the user\r\n * @type {[type]}\r\n */\r\n this.origin = origin;\r\n\r\n /**\r\n * lifeTime After this time, if no ping or Caret position is received => \r\n * remove caret and avatar. if lifetime is -1 we don't add the avatar\r\n * @type {[type]}\r\n */\r\n this.lifeTime = lifeTime;\r\n\r\n /**\r\n * used to store last update time to detected outdated users\r\n * @type {Date}\r\n */\r\n this.time = new Date().getTime();\r\n\r\n /**\r\n * color r,g,b\r\n * @type {String}\r\n */\r\n this.color = this.getColor(this.origin);\r\n\r\n /**\r\n * color rgb(r,g,b)\r\n * @type {String}\r\n */\r\n this.colorRGB = 'rgb(' + this.color + ')';\r\n\r\n /**\r\n * color rgba(r,g,b,0.5)\r\n * @type {String}\r\n */\r\n this.colorRGBLight = 'rgba(' + this.color + ', 0.5)';\r\n\r\n /**\r\n * auto generated pseudo name (from animals list)\r\n * @type {[type]}\r\n */\r\n this.animal = animals.words[hash(this.origin) % animals.words.length];\r\n\r\n /**\r\n * Anonymous + auto generated pseudo name\r\n * @type {String}\r\n */\r\n this.pseudoName = 'Anonymous ' +\r\n this.capitalize(animals.words[hash(this.origin) % animals.words.length]);\r\n\r\n /**\r\n * add or not the avatar \r\n * @type {Boolean}\r\n */\r\n this.avatarAdd = false;\r\n \r\n /**\r\n * true for an editor, false if it is from a ping\r\n * @type {[type]}\r\n */\r\n this.cursor = cursor;\r\n\r\n if (lifeTime != -1) { // -1 => created without timer avatar cursor \r\n if (!isItME) {\r\n /**\r\n * a timer that is used to check if the user is Outdated\r\n * @return {[type]} [description]\r\n */\r\n this.timer = setInterval(() => this.checkIfOutdated(), 1000);\r\n }\r\n this.addAvatar();\r\n if (cursor) {\r\n this.addCursor(range);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * capitalize uppercase the first letter\r\n * @param {[string]} s [string]\r\n * @return {[string]} [String the first letter is in uppercase]\r\n */\r\n capitalize(s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1);\r\n };\r\n\r\n\r\n /**\r\n * getColor for a specific id, get a unique color\r\n * @param {[string]} str [the id of the user]\r\n * @return {[(r,g,b))]} [the corresponding rgb color]\r\n */\r\n getColor(str) {\r\n var h1 = hash(str) % 206;\r\n var h2 = (h1 * 7) % 206;\r\n var h3 = (h1 * 11) % 206;\r\n return Math.floor(h1 + 50) + \", \" + Math.floor(h2 + 50) + \", \" + Math.floor(h3 + 50);\r\n };\r\n\r\n /**\r\n * update the time to keep the avatar and cursor if it exist\r\n * @param {[{index: index,length: 0}]} range [description]\r\n * @param {[boolean]} cursor [if it is true add update the caret position]\r\n */\r\n update(range, cursor) {\r\n this.time = new Date().getTime();\r\n\r\n if (!$(\"#\" + this.origin).length) {\r\n this.addAvatar();\r\n }\r\n\r\n jQuery(\"#\" + this.origin).attr('data-toggle', 'tooltip');\r\n jQuery(\"#\" + this.origin).attr('title', this.pseudoName);\r\n\r\n if (this.cursor == true && cursor == true) { // in the case of update, make sure that ping updates don't change the range\r\n Marker.cursors.moveCursor(this.origin, range);\r\n } else if (cursor == true) {\r\n this.cursor = cursor;\r\n this.addCursor(range);\r\n }\r\n };\r\n\r\n /**\r\n * checkIfOutdated check if the user is outdated and if it is the case remove its caret and avatar \r\n */\r\n checkIfOutdated() {\r\n\r\n var timeNow = new Date().getTime();\r\n var dff = (timeNow - this.time);\r\n // if cursor is outdated \r\n if ((timeNow - this.time) >= this.lifeTime) {\r\n // Remve cursor and avatar\r\n if (this.cursor) {\r\n Marker.cursors.removeCursor(this.origin);\r\n this.cursor = false;\r\n }\r\n this.removeAvatar();\r\n clearInterval(this.timer);\r\n } else {\r\n jQuery(\"#\" + this.origin + \"\").css('opacity', (1 - ((timeNow - this.time) / this.lifeTime)));\r\n\r\n }\r\n\r\n }\r\n\r\n /*\r\n * addAvatar addAvatar of the user to the editor with corresponding divID\r\n * @param {String} divID [the id of the div where the avatars are placed]\r\n */\r\n addAvatar(divID = \"#users\") {\r\n jQuery(divID).append(this.getAvatar());\r\n jQuery(\"#\" + this.origin + \"\").attr('data-toggle', 'tooltip');\r\n jQuery(\"#\" + this.origin + \"\").attr('title', this.pseudoName);\r\n this.avatarAdd = true;\r\n };\r\n\r\n /**\r\n * getAvatar return the div that contains this user id\r\n * @return {[type]} [description]\r\n */\r\n getAvatar() {\r\n return '<div id=\"' + this.origin + '\"style=\"background-color:' + this.colorRGB + ';\"><img class=\"imageuser\" src=\"./icons/' + this.animal + '.png\" alt=\"' + this.pseudoName + '\"></div>';\r\n };\r\n\r\n /**\r\n * removeAvatar remove the avatar of the user from the interface\r\n * @return {[type]} [description]\r\n */\r\n removeAvatar() {\r\n jQuery(\"#\" + this.origin + \"\").remove();\r\n this.avatarAdd = false;\r\n };\r\n\r\n /**\r\n * setPseudo set pseudo for the user\r\n * @param {[type]} Pseudo [description]\r\n */\r\n\r\n setPseudo(Pseudo) {\r\n this.pseudoName = Pseudo;\r\n jQuery(\"#\" + this.origin + \"\").attr('title', this.pseudoName);\r\n };\r\n\r\n /**\r\n * addCursor add the cursor to the editor\r\n * @param {[{index: index,length: 0}]} range [description]\r\n */\r\n addCursor(range) {\r\n this.cursor = true;\r\n Marker.cursors.setCursor(this.origin, range, this.pseudoName, this.colorRGB);\r\n };\r\n\r\n}\r\n\r\nmodule.exports = Marker;",
"static": true,
"longname": "C:/Users/haouari-n/Desktop/CrateV2/jquery-crate/lib/view/marker.js",
"access": "public",
"description": null,
"lineNumber": 1
},
{
"__docId__": 60,
"kind": "class",
"name": "Marker",
"memberof": "view/marker.js",
"static": true,
"longname": "view/marker.js~Marker",
"access": "public",
"export": true,
"importPath": "jquery-crate/view/marker.js",
"importStyle": "Marker",
"description": "Marker is class for managing the marker of one user,it includes the caret, avatar, and pseudo Names.",
"lineNumber": 10,
"interface": false
},
{
"__docId__": 61,
"kind": "constructor",
"name": "constructor",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#constructor",
"access": "public",
"description": "Marker Module manages the Carets, avatars, pseudo names for the different users of the document",
"lineNumber": 21,
"params": [
{
"nullable": null,
"types": [
"[string]"
],
"spread": false,
"optional": false,
"name": "origin",
"description": "the id of the the user"
},
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "lifeTime",
"description": "After this time, if no ping or Caret position is received => \nremove caret and avatar. if lifetime is -1 we didn't add the avatar"
},
{
"nullable": null,
"types": [
"[{index: index,length: 0}]"
],
"spread": false,
"optional": false,
"name": "range",
"description": "range stars from index with the specified length"
},
{
"nullable": null,
"types": [
"[cursor module]"
],
"spread": false,
"optional": false,
"name": "cursorsp",
"description": "the used cursor module for quilljs"
},
{
"nullable": null,
"types": [
"[Boolean]"
],
"spread": false,
"optional": false,
"name": "cursor",
"description": "create the caret or not. If it is from ping, it will be false else true"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isItME",
"description": "is it my caret ? true or false to disable the time if it is true"
}
]
},
{
"__docId__": 62,
"kind": "member",
"name": "origin",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#origin",
"access": "public",
"description": " origin the id of the the user",
"lineNumber": 26,
"type": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": null
}
},
{
"__docId__": 63,
"kind": "member",
"name": "lifeTime",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#lifeTime",
"access": "public",
"description": "lifeTime After this time, if no ping or Caret position is received => \nremove caret and avatar. if lifetime is -1 we don't add the avatar",
"lineNumber": 33,
"type": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": null
}
},
{
"__docId__": 64,
"kind": "member",
"name": "time",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#time",
"access": "public",
"description": "used to store last update time to detected outdated users",
"lineNumber": 39,
"type": {
"nullable": null,
"types": [
"Date"
],
"spread": false,
"description": null
}
},
{
"__docId__": 65,
"kind": "member",
"name": "color",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#color",
"access": "public",
"description": "color r,g,b",
"lineNumber": 45,
"type": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": null
}
},
{
"__docId__": 66,
"kind": "member",
"name": "colorRGB",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#colorRGB",
"access": "public",
"description": "color rgb(r,g,b)",
"lineNumber": 51,
"type": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": null
}
},
{
"__docId__": 67,
"kind": "member",
"name": "colorRGBLight",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#colorRGBLight",
"access": "public",
"description": " color rgba(r,g,b,0.5)",
"lineNumber": 57,
"type": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": null
}
},
{
"__docId__": 68,
"kind": "member",
"name": "animal",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#animal",
"access": "public",
"description": "auto generated pseudo name (from animals list)",
"lineNumber": 63,
"type": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": null
}
},
{
"__docId__": 69,
"kind": "member",
"name": "pseudoName",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#pseudoName",
"access": "public",
"description": "Anonymous + auto generated pseudo name",
"lineNumber": 69,
"type": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": null
}
},
{
"__docId__": 70,
"kind": "member",
"name": "avatarAdd",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#avatarAdd",
"access": "public",
"description": "add or not the avatar ",
"lineNumber": 76,
"type": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": null
}
},
{
"__docId__": 71,
"kind": "member",
"name": "cursor",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#cursor",
"access": "public",
"description": "true for an editor, false if it is from a ping",
"lineNumber": 82,
"type": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": null
}
},
{
"__docId__": 72,
"kind": "member",
"name": "timer",
"memberof": "view/marker.js~Marker",
"static": false,
"longname": "view/marker.js~Marker#timer",
"access": "public",
"description": "a timer that is used to check if the user is Outdated",
"lineNumber": 90,
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 73,
"kind": "method",
"name": "capitalize",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#capitalize",
"access": "public",
"description": "capitalize uppercase the first letter",
"lineNumber": 104,
"params": [
{
"nullable": null,
"types": [
"[string]"
],
"spread": false,
"optional": false,
"name": "s",
"description": "[string]"
}
],
"return": {
"nullable": null,
"types": [
"[string]"
],
"spread": false,
"description": "[String the first letter is in uppercase]"
}
},
{
"__docId__": 74,
"kind": "method",
"name": "getColor",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#getColor",
"access": "public",
"description": "getColor for a specific id, get a unique color",
"lineNumber": 114,
"params": [
{
"nullable": null,
"types": [
"[string]"
],
"spread": false,
"optional": false,
"name": "str",
"description": "[the id of the user]"
}
],
"return": {
"nullable": null,
"types": [
"[(r,g,b))]"
],
"spread": false,
"description": "[the corresponding rgb color]"
}
},
{
"__docId__": 75,
"kind": "method",
"name": "update",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#update",
"access": "public",
"description": "update the time to keep the avatar and cursor if it exist",
"lineNumber": 126,
"params": [
{
"nullable": null,
"types": [
"[{index: index,length: 0}]"
],
"spread": false,
"optional": false,
"name": "range",
"description": "[description]"
},
{
"nullable": null,
"types": [
"[boolean]"
],
"spread": false,
"optional": false,
"name": "cursor",
"description": "[if it is true add update the caret position]"
}
],
"return": null
},
{
"__docId__": 78,
"kind": "method",
"name": "checkIfOutdated",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#checkIfOutdated",
"access": "public",
"description": "checkIfOutdated check if the user is outdated and if it is the case remove its caret and avatar ",
"lineNumber": 147,
"params": [],
"return": null
},
{
"__docId__": 80,
"kind": "method",
"name": "addAvatar",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#addAvatar",
"access": "public",
"description": null,
"lineNumber": 171,
"undocument": true,
"params": [
{
"name": "divID",
"optional": true,
"types": [
"string"
],
"defaultRaw": "#users",
"defaultValue": "#users"
}
],
"return": null
},
{
"__docId__": 82,
"kind": "method",
"name": "getAvatar",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#getAvatar",
"access": "public",
"description": "getAvatar return the div that contains this user id",
"lineNumber": 182,
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"params": []
},
{
"__docId__": 83,
"kind": "method",
"name": "removeAvatar",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#removeAvatar",
"access": "public",
"description": "removeAvatar remove the avatar of the user from the interface",
"lineNumber": 190,
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"params": []
},
{
"__docId__": 85,
"kind": "method",
"name": "setPseudo",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#setPseudo",
"access": "public",
"description": "setPseudo set pseudo for the user",
"lineNumber": 200,
"params": [
{
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"optional": false,
"name": "Pseudo",
"description": "[description]"
}
],
"return": null
},
{
"__docId__": 87,
"kind": "method",
"name": "addCursor",
"memberof": "view/marker.js~Marker",
"generator": false,
"async": false,
"static": false,
"longname": "view/marker.js~Marker#addCursor",
"access": "public",
"description": "addCursor add the cursor to the editor",
"lineNumber": 209,
"params": [
{
"nullable": null,
"types": [
"[{index: index,length: 0}]"
],
"spread": false,
"optional": false,
"name": "range",
"description": "[description]"
}
],
"return": null
},
{
"__docId__": 89,
"kind": "file",
"name": "view/statesheader.js",
"content": "\r\nfunction StatesHeader(model, container){\r\n this.model = model;\r\n \r\n this.red = \"#cd2626\";\r\n this.yellow = \"#eead0e\";\r\n this.green = \"#228b22\";\r\n this.blue = \"#00BFFF\";\r\n \r\n this.signalingState = jQuery('<i>').appendTo(\"#connectionState\")\r\n .addClass('fa fa-circle-o-notch fa-2x')\r\n .attr('data-trigger', 'hover').attr('data-toggle', 'popover')\r\n .attr('titl