Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

master
damencho 10 yıl önce
ebeveyn
işleme
a49505f25d

+ 1
- 1
Makefile Dosyayı Görüntüle

3
 UGLIFYJS = ./node_modules/.bin/uglifyjs
3
 UGLIFYJS = ./node_modules/.bin/uglifyjs
4
 EXORCIST = ./node_modules/.bin/exorcist
4
 EXORCIST = ./node_modules/.bin/exorcist
5
 DEPLOY_DIR = libs
5
 DEPLOY_DIR = libs
6
-BROWSERIFY_FLAGS = -d -x jquery 
6
+BROWSERIFY_FLAGS = -d
7
 OUTPUT_DIR = .
7
 OUTPUT_DIR = .
8
 
8
 
9
 all: compile uglify deploy clean 
9
 all: compile uglify deploy clean 

+ 11
- 0
app.js Dosyayı Görüntüle

1
 /* jshint -W117 */
1
 /* jshint -W117 */
2
 /* application specific logic */
2
 /* application specific logic */
3
 
3
 
4
+require("jquery");
5
+require("jquery-ui");
6
+require("strophe");
7
+require("strophe-disco");
8
+require("strophe-caps");
9
+require("tooltip");
10
+require("popover");
11
+window.toastr = require("toastr");
12
+require("jQuery-Impromptu");
13
+require("autosize");
14
+
4
 var APP =
15
 var APP =
5
 {
16
 {
6
     init: function () {
17
     init: function () {

+ 10
- 10
index.html Dosyayı Görüntüle

10
     <meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
10
     <meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
11
     <meta itemprop="image" content="/images/jitsilogo.png"/>
11
     <meta itemprop="image" content="/images/jitsilogo.png"/>
12
     <script src="https://api.callstats.io/static/callstats.min.js"></script>
12
     <script src="https://api.callstats.io/static/callstats.min.js"></script>
13
-    <script src="libs/jquery-2.1.1.min.js"></script>
13
+    <!--<script src="libs/jquery-2.1.1.min.js"></script>-->
14
     <script src="config.js?v=14"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
14
     <script src="config.js?v=14"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
15
-    <script src="libs/strophe/strophe.min.js?v=2"></script>
16
-    <script src="libs/strophe/strophe.disco.min.js?v=1"></script>
17
-    <script src="libs/strophe/strophe.caps.jsonly.min.js?v=1"></script>
18
-    <script src="libs/jquery-ui.min.js"></script>
19
-    <script src="libs/tooltip.min.js?v=1"></script><!-- bootstrap tooltip lib -->
20
-    <script src="libs/popover.min.js?v=1"></script><!-- bootstrap tooltip lib -->
21
-    <script src="libs/toastr.min.js?v=1"></script><!-- notifications lib -->
15
+    <!--<script src="libs/strophe/strophe.min.js?v=2"></script>-->
16
+    <!--<script src="libs/strophe/strophe.disco.min.js?v=1"></script>-->
17
+    <!--<script src="libs/strophe/strophe.caps.jsonly.min.js?v=1"></script>-->
18
+    <!--<script src="libs/jquery-ui.min.js"></script>-->
19
+    <!--<script src="libs/tooltip.min.js?v=1"></script>&lt;!&ndash; bootstrap tooltip lib &ndash;&gt;-->
20
+    <!--<script src="libs/popover.min.js?v=1"></script>&lt;!&ndash; bootstrap tooltip lib &ndash;&gt;-->
21
+    <!--<script src="libs/toastr.min.js?v=1"></script>&lt;!&ndash; notifications lib &ndash;&gt;-->
22
     <script src="interface_config.js?v=6"></script>
22
     <script src="interface_config.js?v=6"></script>
23
     <script src="libs/app.bundle.min.js?v=138"></script>
23
     <script src="libs/app.bundle.min.js?v=138"></script>
24
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
42
         Link used for inline installation of chrome desktop streaming extension,
42
         Link used for inline installation of chrome desktop streaming extension,
43
         is updated automatically from the code with the value defined in config.js -->
43
         is updated automatically from the code with the value defined in config.js -->
44
     <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/diibjkoicjeejcmhdnailmkgecihlobk">
44
     <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/diibjkoicjeejcmhdnailmkgecihlobk">
45
-    <script src="libs/jquery-impromptu.min.js?v=2"></script>
46
-    <script src="libs/jquery.autosize.min.js"></script>
45
+    <!--<script src="libs/jquery-impromptu.min.js?v=2"></script>-->
46
+    <!--<script src="libs/jquery.autosize.min.js"></script>-->
47
     <!--#include virtual="plugin.head.html" -->
47
     <!--#include virtual="plugin.head.html" -->
48
   </head>
48
   </head>
49
   <body>
49
   <body>

+ 0
- 9190
libs/jquery-2.1.1.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 5
libs/jquery-2.1.1.min.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 1
libs/jquery-2.1.1.min.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 863
libs/jquery-impromptu.js Dosyayı Görüntüle

1
-/*! jQuery-Impromptu - v6.0.0 - 2014-12-27
2
-* http://trentrichardson.com/Impromptu
3
-* Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
-(function(root, factory) {
5
-	if (typeof define === 'function' && define.amd) {
6
-		define(['jquery'], factory);
7
-	} else {
8
-		factory(root.jQuery);
9
-	}
10
-}(this, function($) {
11
-	'use strict';
12
-
13
-	// ########################################################################
14
-	// Base object
15
-	// ########################################################################
16
-
17
-	/**
18
-	* Imp - Impromptu object - passing no params will not open, only return the instance
19
-	* @param message String/Object - String of html or Object of states
20
-	* @param options Object - Options to set the prompt
21
-	* @return Imp - the instance of this Impromptu object
22
-	*/
23
-	var Imp = function(message, options){
24
-		var t = this;
25
-		t.id = Imp.count++;
26
-
27
-		Imp.lifo.push(t);
28
-
29
-		if(message){
30
-			t.open(message, options);
31
-		}
32
-		return t;
33
-	};
34
-
35
-	// ########################################################################
36
-	// static properties and methods
37
-	// ########################################################################
38
-
39
-	/**
40
-	* defaults - the default options
41
-	*/
42
-	Imp.defaults = {
43
-		prefix:'jqi',
44
-		classes: {
45
-			box: '',
46
-			fade: '',
47
-			prompt: '',
48
-			form: '',
49
-			close: '',
50
-			title: '',
51
-			message: '',
52
-			buttons: '',
53
-			button: '',
54
-			defaultButton: ''
55
-		},
56
-		title: '',
57
-		closeText: '&times;',
58
-		buttons: {
59
-			Ok: true
60
-		},
61
-		loaded: function(e){},
62
-		submit: function(e,v,m,f){},
63
-		close: function(e,v,m,f){},
64
-		statechanging: function(e, from, to){},
65
-		statechanged: function(e, to){},
66
-		opacity: 0.6,
67
-		zIndex: 999,
68
-		overlayspeed: 'slow',
69
-		promptspeed: 'fast',
70
-		show: 'fadeIn',
71
-		hide: 'fadeOut',
72
-		focus: 0,
73
-		defaultButton: 0,
74
-		useiframe: false,
75
-		top: '15%',
76
-		position: {
77
-			container: null,
78
-			x: null,
79
-			y: null,
80
-			arrow: null,
81
-			width: null
82
-		},
83
-		persistent: true,
84
-		timeout: 0,
85
-		states: {},
86
-		state: {
87
-			name: null,
88
-			title: '',
89
-			html: '',
90
-			buttons: {
91
-				Ok: true
92
-			},
93
-			focus: 0,
94
-			defaultButton: 0,
95
-			position: {
96
-				container: null,
97
-				x: null,
98
-				y: null,
99
-				arrow: null,
100
-				width: null
101
-			},
102
-			submit: function(e,v,m,f){
103
-				return true;
104
-			}
105
-		}
106
-	};
107
-
108
-	/**
109
-	* setDefaults - Sets the default options
110
-	* @param o Object - Options to set as defaults
111
-	* @return void
112
-	*/
113
-	Imp.setDefaults = function(o) {
114
-		Imp.defaults = $.extend({}, Imp.defaults, o);
115
-	};
116
-
117
-	/**
118
-	* setStateDefaults - Sets the default options for a state
119
-	* @param o Object - Options to set as defaults
120
-	* @return void
121
-	*/
122
-	Imp.setStateDefaults = function(o) {
123
-		Imp.defaults.state = $.extend({}, Imp.defaults.state, o);
124
-	};
125
-
126
-	/**
127
-	* @var Int - A counter used to provide a unique ID for new prompts
128
-	*/
129
-	Imp.count = 0;
130
-
131
-	/**
132
-	* @var Array - An array of Impromptu intances in a LIFO queue (last in first out)
133
-	*/
134
-	Imp.lifo = [];
135
-
136
-	/**
137
-	* getLast - get the last element from the queue (doesn't pop, just returns)
138
-	* @return Imp - the instance of this Impromptu object or false if queue is empty
139
-	*/
140
-	Imp.getLast = function(){
141
-		var l = Imp.lifo.length;
142
-		return (l > 0)? Imp.lifo[l-1] : false;
143
-	};
144
-
145
-	/**
146
-	* removeFromStack - remove an element from the lifo stack by its id
147
-	* @param id int - id of the instance to remove
148
-	* @return api - The api of the element removed from the stack or void
149
-	*/
150
-	Imp.removeFromStack = function(id){
151
-		for(var i=Imp.lifo.length-1; i>=0; i--){
152
-			if(Imp.lifo[i].id === id){
153
-				return Imp.lifo.splice(i,1)[0];
154
-			}
155
-		}
156
-	};
157
-
158
-	// ########################################################################
159
-	// extend our object instance properties and methods
160
-	// ########################################################################
161
-	Imp.prototype = {
162
-
163
-		/**
164
-		* @var Int - A unique id, simply an autoincremented number
165
-		*/
166
-		id: null,
167
-
168
-		/**
169
-		* open - Opens the prompt
170
-		* @param message String/Object - String of html or Object of states
171
-		* @param options Object - Options to set the prompt
172
-		* @return Imp - the instance of this Impromptu object
173
-		*/
174
-		open: function(message, options) {
175
-			var t = this;
176
-
177
-			t.options = $.extend({},Imp.defaults,options);
178
-
179
-			// Be sure any previous timeouts are destroyed
180
-			if(t.timeout){
181
-				clearTimeout(t.timeout);
182
-			}
183
-			t.timeout = false;
184
-
185
-			var opts = t.options,
186
-				$body = $(document.body),
187
-				$window = $(window);
188
-
189
-			//build the box and fade
190
-			var msgbox = '<div class="'+ opts.prefix +'box '+ opts.classes.box +'">';
191
-			if(opts.useiframe && ($('object, applet').length > 0)) {
192
-				msgbox += '<iframe src="javascript:false;" style="display:block;position:absolute;z-index:-1;" class="'+ opts.prefix +'fade '+ opts.classes.fade +'"></iframe>';
193
-			} else {
194
-				msgbox += '<div class="'+ opts.prefix +'fade '+ opts.classes.fade +'"></div>';
195
-			}
196
-			msgbox += '<div class="'+ opts.prefix +' '+ opts.classes.prompt +'">'+
197
-						'<form action="javascript:false;" onsubmit="return false;" class="'+ opts.prefix +'form '+ opts.classes.form +'">'+
198
-							'<div class="'+ opts.prefix +'close '+ opts.classes.close +'">'+ opts.closeText +'</div>'+
199
-							'<div class="'+ opts.prefix +'states"></div>'+
200
-						'</form>'+
201
-					'</div>'+
202
-				'</div>';
203
-
204
-			t.jqib = $(msgbox).appendTo($body);
205
-			t.jqi = t.jqib.children('.'+ opts.prefix);
206
-			t.jqif = t.jqib.children('.'+ opts.prefix +'fade');
207
-
208
-			//if a string was passed, convert to a single state
209
-			if(message.constructor === String){
210
-				message = {
211
-					state0: {
212
-						title: opts.title,
213
-						html: message,
214
-						buttons: opts.buttons,
215
-						position: opts.position,
216
-						focus: opts.focus,
217
-						defaultButton: opts.defaultButton,
218
-						submit: opts.submit
219
-					}
220
-				};
221
-			}
222
-
223
-			//build the states
224
-			t.options.states = {};
225
-			var k,v;
226
-			for(k in message){
227
-				v = $.extend({},Imp.defaults.state,{name:k},message[k]);
228
-				t.addState(v.name, v);
229
-
230
-				if(t.currentStateName === ''){
231
-					t.currentStateName = v.name;
232
-				}
233
-			}
234
-
235
-			//Events
236
-			t.jqi.on('click', '.'+ opts.prefix +'buttons button', function(e){
237
-				var $t = $(this),
238
-					$state = $t.parents('.'+ opts.prefix +'state'),
239
-					stateobj = t.options.states[$state.data('jqi-name')],
240
-					msg = $state.children('.'+ opts.prefix +'message'),
241
-					clicked = stateobj.buttons[$t.text()] || stateobj.buttons[$t.html()],
242
-					forminputs = {};
243
-
244
-				// if for some reason we couldn't get the value
245
-				if(clicked === undefined){
246
-					for(var i in stateobj.buttons){
247
-						if(stateobj.buttons[i].title === $t.text() || stateobj.buttons[i].title === $t.html()){
248
-							clicked = stateobj.buttons[i].value;
249
-						}
250
-					}
251
-				}
252
-
253
-				//collect all form element values from all states.
254
-				$.each(t.jqi.children('form').serializeArray(),function(i,obj){
255
-					if (forminputs[obj.name] === undefined) {
256
-						forminputs[obj.name] = obj.value;
257
-					} else if (typeof forminputs[obj.name] === Array || typeof forminputs[obj.name] === 'object') {
258
-						forminputs[obj.name].push(obj.value);
259
-					} else {
260
-						forminputs[obj.name] = [forminputs[obj.name],obj.value];
261
-					}
262
-				});
263
-
264
-				// trigger an event
265
-				var promptsubmite = new $.Event('impromptu:submit');
266
-				promptsubmite.stateName = stateobj.name;
267
-				promptsubmite.state = $state;
268
-				$state.trigger(promptsubmite, [clicked, msg, forminputs]);
269
-
270
-				if(!promptsubmite.isDefaultPrevented()){
271
-					t.close(true, clicked,msg,forminputs);
272
-				}
273
-			});
274
-
275
-			// if the fade is clicked blink the prompt
276
-			var fadeClicked = function(){
277
-				if(opts.persistent){
278
-					var offset = (opts.top.toString().indexOf('%') >= 0? ($window.height()*(parseInt(opts.top,10)/100)) : parseInt(opts.top,10)),
279
-						top = parseInt(t.jqi.css('top').replace('px',''),10) - offset;
280
-
281
-					//$window.scrollTop(top);
282
-					$('html,body').animate({ scrollTop: top }, 'fast', function(){
283
-						var i = 0;
284
-						t.jqib.addClass(opts.prefix +'warning');
285
-						var intervalid = setInterval(function(){
286
-							t.jqib.toggleClass(opts.prefix +'warning');
287
-							if(i++ > 1){
288
-								clearInterval(intervalid);
289
-								t.jqib.removeClass(opts.prefix +'warning');
290
-							}
291
-						}, 100);
292
-					});
293
-				}
294
-				else {
295
-					t.close(true);
296
-				}
297
-			};
298
-
299
-			// listen for esc or tab keys
300
-			var keyDownEventHandler = function(e){
301
-				var key = (window.event) ? event.keyCode : e.keyCode;
302
-
303
-				//escape key closes
304
-				if(key === 27) {
305
-					fadeClicked();
306
-				}
307
-
308
-				//enter key pressed trigger the default button if its not on it, ignore if it is a textarea
309
-				if(key === 13){
310
-					var $defBtn = t.getCurrentState().find('.'+ opts.prefix +'defaultbutton');
311
-					var $tgt = $(e.target);
312
-
313
-					if($tgt.is('textarea,.'+opts.prefix+'button') === false && $defBtn.length > 0){
314
-						e.preventDefault();
315
-						$defBtn.click();
316
-					}
317
-				}
318
-
319
-				//constrain tabs, tabs should iterate through the state and not leave
320
-				if (key === 9){
321
-					var $inputels = $('input,select,textarea,button',t.getCurrentState());
322
-					var fwd = !e.shiftKey && e.target === $inputels[$inputels.length-1];
323
-					var back = e.shiftKey && e.target === $inputels[0];
324
-					if (fwd || back) {
325
-						setTimeout(function(){
326
-							if (!$inputels){
327
-								return;
328
-							}
329
-							var el = $inputels[back===true ? $inputels.length-1 : 0];
330
-
331
-							if (el){
332
-								el.focus();
333
-							}
334
-						},10);
335
-						return false;
336
-					}
337
-				}
338
-			};
339
-
340
-			t.position();
341
-			t.style();
342
-
343
-			// store copy of the window resize function for interal use only
344
-			t._windowResize = function(e){
345
-				t.position(e);
346
-			};
347
-			$window.resize({ animate: false }, t._windowResize);
348
-
349
-			t.jqif.click(fadeClicked);
350
-			t.jqi.find('.'+ opts.prefix +'close').click(function(){ t.close(); });
351
-			t.jqib.on("keydown",keyDownEventHandler)
352
-						.on('impromptu:loaded', opts.loaded)
353
-						.on('impromptu:close', opts.close)
354
-						.on('impromptu:statechanging', opts.statechanging)
355
-						.on('impromptu:statechanged', opts.statechanged);
356
-
357
-			// Show it
358
-			t.jqif[opts.show](opts.overlayspeed);
359
-			t.jqi[opts.show](opts.promptspeed, function(){
360
-
361
-				var $firstState = t.jqi.find('.'+ opts.prefix +'states .'+ opts.prefix +'state').eq(0);
362
-				t.goToState($firstState.data('jqi-name'));
363
-
364
-				t.jqib.trigger('impromptu:loaded');
365
-			});
366
-
367
-			// Timeout
368
-			if(opts.timeout > 0){
369
-				t.timeout = setTimeout(function(){ t.close(true); },opts.timeout);
370
-			}
371
-
372
-			return t;
373
-		},
374
-
375
-		/**
376
-		* close - Closes the prompt
377
-		* @param callback Function - called when the transition is complete
378
-		* @param clicked String - value of the button clicked (only used internally)
379
-		* @param msg jQuery - The state message body (only used internally)
380
-		* @param forvals Object - key/value pairs of all form field names and values (only used internally)
381
-		* @return Imp - the instance of this Impromptu object
382
-		*/
383
-		close: function(callCallback, clicked, msg, formvals){
384
-			var t = this;
385
-			Imp.removeFromStack(t.id);
386
-
387
-			if(t.timeout){
388
-				clearTimeout(t.timeout);
389
-				t.timeout = false;
390
-			}
391
-
392
-			if(t.jqib){
393
-				t.jqib[t.options.hide]('fast',function(){
394
-					
395
-					t.jqib.trigger('impromptu:close', [clicked,msg,formvals]);
396
-					
397
-					t.jqib.remove();
398
-					
399
-					$(window).off('resize', t._windowResize);
400
-
401
-					if(typeof callCallback === 'function'){
402
-						callCallback();
403
-					}
404
-				});
405
-			}
406
-			t.currentStateName = "";
407
-
408
-			return t;
409
-		},
410
-
411
-		/**
412
-		* addState - Injects a state into the prompt
413
-		* @param statename String - Name of the state
414
-		* @param stateobj Object - options for the state
415
-		* @param afterState String - selector of the state to insert after
416
-		* @return jQuery - the newly created state
417
-		*/
418
-		addState: function(statename, stateobj, afterState) {
419
-			var t = this,
420
-				state = '',
421
-				$state = null,
422
-				arrow = '',
423
-				title = '',
424
-				opts = t.options,
425
-				$jqistates = $('.'+ opts.prefix +'states'),
426
-				buttons = [],
427
-				showHtml,defbtn,k,v,l,i=0;
428
-
429
-			stateobj = $.extend({},Imp.defaults.state, {name:statename}, stateobj);
430
-
431
-			if(stateobj.position.arrow !== null){
432
-				arrow = '<div class="'+ opts.prefix + 'arrow '+ opts.prefix + 'arrow'+ stateobj.position.arrow +'"></div>';
433
-			}
434
-			if(stateobj.title && stateobj.title !== ''){
435
-				title = '<div class="lead '+ opts.prefix + 'title '+ opts.classes.title +'">'+  stateobj.title +'</div>';
436
-			}
437
-
438
-			showHtml = stateobj.html;
439
-			if (typeof stateobj.html === 'function') {
440
-				showHtml = 'Error: html function must return text';
441
-			}
442
-
443
-			state += '<div class="'+ opts.prefix + 'state" data-jqi-name="'+ statename +'" style="display:none;">'+
444
-						arrow + title +
445
-						'<div class="'+ opts.prefix +'message '+ opts.classes.message +'">' + showHtml +'</div>'+
446
-						'<div class="'+ opts.prefix +'buttons '+ opts.classes.buttons +'"'+ ($.isEmptyObject(stateobj.buttons)? 'style="display:none;"':'') +'>';
447
-
448
-			// state buttons may be in object or array, lets convert objects to arrays
449
-			if($.isArray(stateobj.buttons)){
450
-				buttons = stateobj.buttons;
451
-			}
452
-			else if($.isPlainObject(stateobj.buttons)){
453
-				for(k in stateobj.buttons){
454
-					if(stateobj.buttons.hasOwnProperty(k)){
455
-						buttons.push({ title: k, value: stateobj.buttons[k] });
456
-					}
457
-				}
458
-			}
459
-
460
-			// iterate over each button and create them
461
-			for(i=0, l=buttons.length; i<l; i++){
462
-				v = buttons[i],
463
-				defbtn = stateobj.focus === i || (isNaN(stateobj.focus) && stateobj.defaultButton === i) ? (opts.prefix + 'defaultbutton ' + opts.classes.defaultButton) : '';
464
-
465
-				state += '<button class="'+ opts.classes.button +' '+ opts.prefix + 'button '+ defbtn;
466
-
467
-				if(typeof v.classes !== "undefined"){
468
-					state += ' '+ ($.isArray(v.classes)? v.classes.join(' ') : v.classes) + ' ';
469
-				}
470
-
471
-				state += '" name="' + opts.prefix + '_' + statename + '_button' + v.title.replace(/[^a-z0-9]+/gi,'') + '" value="' + v.value + '">' + v.title + '</button>';
472
-			}
473
-			
474
-			state += '</div></div>';
475
-
476
-			$state = $(state);
477
-
478
-			$state.on('impromptu:submit', stateobj.submit);
479
-
480
-			if(afterState !== undefined){
481
-				$jqistates.find('[data-jqi-name="'+afterState+'"]').after($state);
482
-			}
483
-			else{
484
-				$jqistates.append($state);
485
-			}
486
-
487
-			t.options.states[statename] = stateobj;
488
-
489
-			return $state;
490
-		},
491
-
492
-		/**
493
-		* removeState - Removes a state from the prompt
494
-		* @param state String - Name of the state
495
-		* @param newState String - Name of the state to transition to
496
-		* @return Boolean - returns true on success, false on failure
497
-		*/
498
-		removeState: function(state, newState) {
499
-			var t = this,
500
-				$state = t.getState(state),
501
-				rm = function(){ $state.remove(); };
502
-
503
-			if($state.length === 0){
504
-				return false;
505
-			}
506
-
507
-			// transition away from it before deleting
508
-			if($state.css('display') !== 'none'){
509
-				if(newState !== undefined && t.getState(newState).length > 0){
510
-					t.goToState(newState, false, rm);
511
-				}
512
-				else if($state.next().length > 0){
513
-					t.nextState(rm);
514
-				}
515
-				else if($state.prev().length > 0){
516
-					t.prevState(rm);
517
-				}
518
-				else{
519
-					t.close();
520
-				}
521
-			}
522
-			else{
523
-				$state.slideUp('slow', rm);
524
-			}
525
-
526
-			return true;
527
-		},
528
-
529
-		/**
530
-		* getApi - Get the api, so you can extract it from $.prompt stack
531
-		* @return jQuery - the prompt
532
-		*/
533
-		getApi: function() {
534
-			return this;
535
-		},
536
-
537
-		/**
538
-		* getBox - Get the box containing fade and prompt
539
-		* @return jQuery - the prompt
540
-		*/
541
-		getBox: function() {
542
-			return this.jqib;
543
-		},
544
-
545
-		/**
546
-		* getPrompt - Get the prompt
547
-		* @return jQuery - the prompt
548
-		*/
549
-		getPrompt: function() {
550
-			return this.jqi;
551
-		},
552
-
553
-		/**
554
-		* getState - Get the state by its name
555
-		* @param statename String - Name of the state
556
-		* @return jQuery - the state
557
-		*/
558
-		getState: function(statename) {
559
-			return this.jqi.find('[data-jqi-name="'+ statename +'"]');
560
-		},
561
-
562
-		/**
563
-		* getCurrentState - Get the current visible state
564
-		* @return jQuery - the current visible state
565
-		*/
566
-		getCurrentState: function() {
567
-			return this.getState(this.getCurrentStateName());
568
-		},
569
-
570
-		/**
571
-		* getCurrentStateName - Get the name of the current visible state/substate
572
-		* @return String - the current visible state's name
573
-		*/
574
-		getCurrentStateName: function() {
575
-			return this.currentStateName;
576
-		},
577
-
578
-		/**
579
-		* position - Repositions the prompt (Used internally)
580
-		* @return void
581
-		*/
582
-		position: function(e){
583
-			var t = this,
584
-				restoreFx = $.fx.off,
585
-				$state = t.getCurrentState(),
586
-				stateObj = t.options.states[$state.data('jqi-name')],
587
-				pos = stateObj? stateObj.position : undefined,
588
-				$window = $(window),
589
-				bodyHeight = document.body.scrollHeight, //$(document.body).outerHeight(true),
590
-				windowHeight = $(window).height(),
591
-				documentHeight = $(document).height(),
592
-				height = bodyHeight > windowHeight ? bodyHeight : windowHeight,
593
-				top = parseInt($window.scrollTop(),10) + (t.options.top.toString().indexOf('%') >= 0?
594
-						(windowHeight*(parseInt(t.options.top,10)/100)) : parseInt(t.options.top,10));
595
-
596
-			// when resizing the window turn off animation
597
-			if(e !== undefined && e.data.animate === false){
598
-				$.fx.off = true;
599
-			}
600
-
601
-			t.jqib.css({
602
-				position: "absolute",
603
-				height: height,
604
-				width: "100%",
605
-				top: 0,
606
-				left: 0,
607
-				right: 0,
608
-				bottom: 0
609
-			});
610
-			t.jqif.css({
611
-				position: "fixed",
612
-				height: height,
613
-				width: "100%",
614
-				top: 0,
615
-				left: 0,
616
-				right: 0,
617
-				bottom: 0
618
-			});
619
-
620
-			// tour positioning
621
-			if(pos && pos.container){
622
-				var offset = $(pos.container).offset();
623
-
624
-				if($.isPlainObject(offset) && offset.top !== undefined){
625
-					t.jqi.css({
626
-						position: "absolute"
627
-					});
628
-					t.jqi.animate({
629
-						top: offset.top + pos.y,
630
-						left: offset.left + pos.x,
631
-						marginLeft: 0,
632
-						width: (pos.width !== undefined)? pos.width : null
633
-					});
634
-					top = (offset.top + pos.y) - (t.options.top.toString().indexOf('%') >= 0? (windowHeight*(parseInt(t.options.top,10)/100)) : parseInt(t.options.top,10));
635
-					$('html,body').animate({ scrollTop: top }, 'slow', 'swing', function(){});
636
-				}
637
-			}
638
-			// custom state width animation
639
-			else if(pos && pos.width){
640
-				t.jqi.css({
641
-						position: "absolute",
642
-						left: '50%'
643
-					});
644
-				t.jqi.animate({
645
-						top: pos.y || top,
646
-						left: pos.x || '50%',
647
-						marginLeft: ((pos.width/2)*-1),
648
-						width: pos.width
649
-					});
650
-			}
651
-			// standard prompt positioning
652
-			else{
653
-				t.jqi.css({
654
-					position: "absolute",
655
-					top: top,
656
-					left: '50%',//$window.width()/2,
657
-					marginLeft: ((t.jqi.outerWidth(false)/2)*-1)
658
-				});
659
-			}
660
-
661
-			// restore fx settings
662
-			if(e !== undefined && e.data.animate === false){
663
-				$.fx.off = restoreFx;
664
-			}
665
-		},
666
-
667
-		/**
668
-		* style - Restyles the prompt (Used internally)
669
-		* @return void
670
-		*/
671
-		style: function(){
672
-			var t = this;
673
-			
674
-			t.jqif.css({
675
-				zIndex: t.options.zIndex,
676
-				display: "none",
677
-				opacity: t.options.opacity
678
-			});
679
-			t.jqi.css({
680
-				zIndex: t.options.zIndex+1,
681
-				display: "none"
682
-			});
683
-			t.jqib.css({
684
-				zIndex: t.options.zIndex
685
-			});
686
-		},
687
-
688
-		/**
689
-		* goToState - Goto the specified state
690
-		* @param state String - name of the state to transition to
691
-		* @param subState Boolean - true to be a sub state within the currently open state
692
-		* @param callback Function - called when the transition is complete
693
-		* @return jQuery - the newly active state
694
-		*/
695
-		goToState: function(state, subState, callback) {
696
-			var t = this,
697
-				$jqi = t.jqi,
698
-				jqiopts = t.options,
699
-				$state = t.getState(state),
700
-				stateobj = jqiopts.states[$state.data('jqi-name')],
701
-				promptstatechanginge = new $.Event('impromptu:statechanging'),
702
-				opts = t.options;
703
-
704
-			if(stateobj !== undefined){
705
-
706
-
707
-				if (typeof stateobj.html === 'function') {
708
-					var contentLaterFunc = stateobj.html;
709
-					$state.find('.' + opts.prefix +'message ').html(contentLaterFunc());
710
-				}
711
-
712
-				// subState can be ommitted
713
-				if(typeof subState === 'function'){
714
-					callback = subState;
715
-					subState = false;
716
-				}
717
-
718
-				t.jqib.trigger(promptstatechanginge, [t.getCurrentStateName(), state]);
719
-
720
-				if(!promptstatechanginge.isDefaultPrevented() && $state.length > 0){
721
-					t.jqi.find('.'+ opts.prefix +'parentstate').removeClass(opts.prefix +'parentstate');
722
-
723
-					if(subState){ // hide any open substates
724
-						// get rid of any substates
725
-						t.jqi.find('.'+ opts.prefix +'substate').not($state)
726
-							.slideUp(jqiopts.promptspeed)
727
-							.removeClass('.'+ opts.prefix +'substate')
728
-							.find('.'+ opts.prefix +'arrow').hide();
729
-
730
-						// add parent state class so it can be visible, but blocked
731
-						t.jqi.find('.'+ opts.prefix +'state:visible').addClass(opts.prefix +'parentstate');
732
-
733
-						// add substate class so we know it will be smaller
734
-						$state.addClass(opts.prefix +'substate');
735
-					}
736
-					else{ // hide any open states
737
-						t.jqi.find('.'+ opts.prefix +'state').not($state)
738
-							.slideUp(jqiopts.promptspeed)
739
-							.find('.'+ opts.prefix +'arrow').hide();
740
-					}
741
-					t.currentStateName = stateobj.name;
742
-
743
-					$state.slideDown(jqiopts.promptspeed,function(){
744
-						var $t = $(this);
745
-
746
-						// if focus is a selector, find it, else its button index
747
-						if(typeof(stateobj.focus) === 'string'){
748
-							$t.find(stateobj.focus).eq(0).focus();
749
-						}
750
-						else{
751
-							$t.find('.'+ opts.prefix +'defaultbutton').focus();
752
-						}
753
-
754
-						$t.find('.'+ opts.prefix +'arrow').show(jqiopts.promptspeed);
755
-
756
-						if (typeof callback === 'function'){
757
-							t.jqib.on('impromptu:statechanged', callback);
758
-						}
759
-						t.jqib.trigger('impromptu:statechanged', [state]);
760
-						if (typeof callback === 'function'){
761
-							t.jqib.off('impromptu:statechanged', callback);
762
-						}
763
-					});
764
-					if(!subState){
765
-						t.position();
766
-					}
767
-				} // end isDefaultPrevented()	
768
-			}// end stateobj !== undefined
769
-
770
-			return $state;
771
-		},
772
-
773
-		/**
774
-		* nextState - Transition to the next state
775
-		* @param callback Function - called when the transition is complete
776
-		* @return jQuery - the newly active state
777
-		*/
778
-		nextState: function(callback) {
779
-			var t = this,
780
-				$next = t.getCurrentState().next();
781
-			if($next.length > 0){
782
-				t.goToState( $next.data('jqi-name'), callback );
783
-			}
784
-			return $next;
785
-		},
786
-
787
-		/**
788
-		* prevState - Transition to the previous state
789
-		* @param callback Function - called when the transition is complete
790
-		* @return jQuery - the newly active state
791
-		*/
792
-		prevState: function(callback) {
793
-			var t = this,
794
-				$prev = t.getCurrentState().prev();
795
-			if($prev.length > 0){
796
-				t.goToState( $prev.data('jqi-name'), callback );
797
-			}
798
-			return $prev;
799
-		}
800
-
801
-	};
802
-
803
-	// ########################################################################
804
-	// $.prompt will manage a queue of Impromptu instances
805
-	// ########################################################################
806
-
807
-	/**
808
-	* $.prompt create a new Impromptu instance and push it on the stack of instances
809
-	* @param message String/Object - String of html or Object of states
810
-	* @param options Object - Options to set the prompt
811
-	* @return jQuery - the jQuery object of the prompt within the modal
812
-	*/
813
-	$.prompt = function(message, options){
814
-		var api = new Imp(message, options);
815
-		return api.jqi;
816
-	};
817
-
818
-	/**
819
-	* Copy over static methods
820
-	*/
821
-	$.each(Imp, function(k,v){
822
-		$.prompt[k] = v;
823
-	});
824
-
825
-	/**
826
-	* Create a proxy for accessing all instance methods. The close method pops from queue.
827
-	*/
828
-	$.each(Imp.prototype, function(k,v){
829
-		$.prompt[k] = function(){
830
-			var api = Imp.getLast(); // always use the last instance on the stack
831
-
832
-			if(api && typeof api[k] === "function"){
833
-				return api[k].apply(api, arguments);
834
-			}
835
-		};
836
-	});
837
-
838
-	// ########################################################################
839
-	// jQuery Plugin and public access
840
-	// ########################################################################
841
-
842
-	/**
843
-	* Enable using $('.selector').prompt({});
844
-	* This will grab the html within the prompt as the prompt message
845
-	*/
846
-	$.fn.prompt = function(options){
847
-		if(options === undefined){
848
-			options = {};
849
-		}
850
-		if(options.withDataAndEvents === undefined){
851
-			options.withDataAndEvents = false;
852
-		}
853
-
854
-		$.prompt($(this).clone(options.withDataAndEvents).html(),options);
855
-	};
856
-
857
-	/**
858
-	* Export it as Impromptu and $.prompt
859
-	* Can be used from here forth as new Impromptu(states, opts)
860
-	*/
861
-	window.Impromptu = Imp;
862
-
863
-}));

+ 0
- 2
libs/jquery-impromptu.min.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 1
libs/jquery-impromptu.min.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 15008
libs/jquery-ui.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 10
libs/jquery-ui.min.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 1
libs/jquery-ui.min.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 250
libs/jquery.autosize.js Dosyayı Görüntüle

1
-/*!
2
-	Autosize v1.18.1 - 2013-11-05
3
-	Automatically adjust textarea height based on user input.
4
-	(c) 2013 Jack Moore - http://www.jacklmoore.com/autosize
5
-	license: http://www.opensource.org/licenses/mit-license.php
6
-*/
7
-(function ($) {
8
-	var
9
-	defaults = {
10
-		className: 'autosizejs',
11
-		append: '',
12
-		callback: false,
13
-		resizeDelay: 10
14
-	},
15
-
16
-	// border:0 is unnecessary, but avoids a bug in Firefox on OSX
17
-	copy = '<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',
18
-
19
-	// line-height is conditionally included because IE7/IE8/old Opera do not return the correct value.
20
-	typographyStyles = [
21
-		'fontFamily',
22
-		'fontSize',
23
-		'fontWeight',
24
-		'fontStyle',
25
-		'letterSpacing',
26
-		'textTransform',
27
-		'wordSpacing',
28
-		'textIndent'
29
-	],
30
-
31
-	// to keep track which textarea is being mirrored when adjust() is called.
32
-	mirrored,
33
-
34
-	// the mirror element, which is used to calculate what size the mirrored element should be.
35
-	mirror = $(copy).data('autosize', true)[0];
36
-
37
-	// test that line-height can be accurately copied.
38
-	mirror.style.lineHeight = '99px';
39
-	if ($(mirror).css('lineHeight') === '99px') {
40
-		typographyStyles.push('lineHeight');
41
-	}
42
-	mirror.style.lineHeight = '';
43
-
44
-	$.fn.autosize = function (options) {
45
-		if (!this.length) {
46
-			return this;
47
-		}
48
-
49
-		options = $.extend({}, defaults, options || {});
50
-
51
-		if (mirror.parentNode !== document.body) {
52
-			$(document.body).append(mirror);
53
-		}
54
-
55
-		return this.each(function () {
56
-			var
57
-			ta = this,
58
-			$ta = $(ta),
59
-			maxHeight,
60
-			minHeight,
61
-			boxOffset = 0,
62
-			callback = $.isFunction(options.callback),
63
-			originalStyles = {
64
-				height: ta.style.height,
65
-				overflow: ta.style.overflow,
66
-				overflowY: ta.style.overflowY,
67
-				wordWrap: ta.style.wordWrap,
68
-				resize: ta.style.resize
69
-			},
70
-			timeout,
71
-			width = $ta.width();
72
-
73
-			if ($ta.data('autosize')) {
74
-				// exit if autosize has already been applied, or if the textarea is the mirror element.
75
-				return;
76
-			}
77
-			$ta.data('autosize', true);
78
-
79
-			if ($ta.css('box-sizing') === 'border-box' || $ta.css('-moz-box-sizing') === 'border-box' || $ta.css('-webkit-box-sizing') === 'border-box'){
80
-				boxOffset = $ta.outerHeight() - $ta.height();
81
-			}
82
-
83
-			// IE8 and lower return 'auto', which parses to NaN, if no min-height is set.
84
-			minHeight = Math.max(parseInt($ta.css('minHeight'), 10) - boxOffset || 0, $ta.height());
85
-
86
-			$ta.css({
87
-				overflow: 'hidden',
88
-				overflowY: 'hidden',
89
-				wordWrap: 'break-word', // horizontal overflow is hidden, so break-word is necessary for handling words longer than the textarea width
90
-				resize: ($ta.css('resize') === 'none' || $ta.css('resize') === 'vertical') ? 'none' : 'horizontal'
91
-			});
92
-
93
-			// The mirror width must exactly match the textarea width, so using getBoundingClientRect because it doesn't round the sub-pixel value.
94
-			function setWidth() {
95
-				var style, width;
96
-				
97
-				if ('getComputedStyle' in window) {
98
-					style = window.getComputedStyle(ta, null);
99
-					width = ta.getBoundingClientRect().width;
100
-
101
-					$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){
102
-						width -= parseInt(style[val],10);
103
-					});
104
-
105
-					mirror.style.width = width + 'px';
106
-				}
107
-				else {
108
-					// window.getComputedStyle, getBoundingClientRect returning a width are unsupported and unneeded in IE8 and lower.
109
-					mirror.style.width = Math.max($ta.width(), 0) + 'px';
110
-				}
111
-			}
112
-
113
-			function initMirror() {
114
-				var styles = {};
115
-
116
-				mirrored = ta;
117
-				mirror.className = options.className;
118
-				maxHeight = parseInt($ta.css('maxHeight'), 10);
119
-
120
-				// mirror is a duplicate textarea located off-screen that
121
-				// is automatically updated to contain the same text as the
122
-				// original textarea.  mirror always has a height of 0.
123
-				// This gives a cross-browser supported way getting the actual
124
-				// height of the text, through the scrollTop property.
125
-				$.each(typographyStyles, function(i,val){
126
-					styles[val] = $ta.css(val);
127
-				});
128
-				$(mirror).css(styles);
129
-
130
-				setWidth();
131
-
132
-				// Chrome-specific fix:
133
-				// When the textarea y-overflow is hidden, Chrome doesn't reflow the text to account for the space
134
-				// made available by removing the scrollbar. This workaround triggers the reflow for Chrome.
135
-				if (window.chrome) {
136
-					var width = ta.style.width;
137
-					ta.style.width = '0px';
138
-					var ignore = ta.offsetWidth;
139
-					ta.style.width = width;
140
-				}
141
-			}
142
-
143
-			// Using mainly bare JS in this function because it is going
144
-			// to fire very often while typing, and needs to very efficient.
145
-			function adjust() {
146
-				var height, original;
147
-
148
-				if (mirrored !== ta) {
149
-					initMirror();
150
-				} else {
151
-					setWidth();
152
-				}
153
-
154
-				mirror.value = ta.value + options.append;
155
-				mirror.style.overflowY = ta.style.overflowY;
156
-				original = parseInt(ta.style.height,10);
157
-
158
-				// Setting scrollTop to zero is needed in IE8 and lower for the next step to be accurately applied
159
-				mirror.scrollTop = 0;
160
-
161
-				mirror.scrollTop = 9e4;
162
-
163
-				// Using scrollTop rather than scrollHeight because scrollHeight is non-standard and includes padding.
164
-				height = mirror.scrollTop;
165
-
166
-				if (maxHeight && height > maxHeight) {
167
-					ta.style.overflowY = 'scroll';
168
-					height = maxHeight;
169
-				} else {
170
-					ta.style.overflowY = 'hidden';
171
-					if (height < minHeight) {
172
-						height = minHeight;
173
-					}
174
-				}
175
-
176
-				height += boxOffset;
177
-
178
-				if (original !== height) {
179
-					ta.style.height = height + 'px';
180
-					if (callback) {
181
-						options.callback.call(ta,ta);
182
-					}
183
-				}
184
-			}
185
-
186
-			function resize () {
187
-				clearTimeout(timeout);
188
-				timeout = setTimeout(function(){
189
-					var newWidth = $ta.width();
190
-
191
-					if (newWidth !== width) {
192
-						width = newWidth;
193
-						adjust();
194
-					}
195
-				}, parseInt(options.resizeDelay,10));
196
-			}
197
-
198
-			if ('onpropertychange' in ta) {
199
-				if ('oninput' in ta) {
200
-					// Detects IE9.  IE9 does not fire onpropertychange or oninput for deletions,
201
-					// so binding to onkeyup to catch most of those occasions.  There is no way that I
202
-					// know of to detect something like 'cut' in IE9.
203
-					$ta.on('input.autosize keyup.autosize', adjust);
204
-				} else {
205
-					// IE7 / IE8
206
-					$ta.on('propertychange.autosize', function(){
207
-						if(event.propertyName === 'value'){
208
-							adjust();
209
-						}
210
-					});
211
-				}
212
-			} else {
213
-				// Modern Browsers
214
-				$ta.on('input.autosize', adjust);
215
-			}
216
-
217
-			// Set options.resizeDelay to false if using fixed-width textarea elements.
218
-			// Uses a timeout and width check to reduce the amount of times adjust needs to be called after window resize.
219
-
220
-			if (options.resizeDelay !== false) {
221
-				$(window).on('resize.autosize', resize);
222
-			}
223
-
224
-			// Event for manual triggering if needed.
225
-			// Should only be needed when the value of the textarea is changed through JavaScript rather than user input.
226
-			$ta.on('autosize.resize', adjust);
227
-
228
-			// Event for manual triggering that also forces the styles to update as well.
229
-			// Should only be needed if one of typography styles of the textarea change, and the textarea is already the target of the adjust method.
230
-			$ta.on('autosize.resizeIncludeStyle', function() {
231
-				mirrored = null;
232
-				adjust();
233
-			});
234
-
235
-			$ta.on('autosize.destroy', function(){
236
-				mirrored = null;
237
-				clearTimeout(timeout);
238
-				$(window).off('resize', resize);
239
-				$ta
240
-					.off('autosize')
241
-					.off('.autosize')
242
-					.css(originalStyles)
243
-					.removeData('autosize');
244
-			});
245
-
246
-			// Call adjust in case the textarea already contains text.
247
-			adjust();
248
-		});
249
-	};
250
-}(window.jQuery || window.$)); // jQuery or jQuery-like library, such as Zepto

+ 0
- 2
libs/jquery.autosize.min.js Dosyayı Görüntüle

1
-(function($){var defaults={className:"autosizejs",append:"",callback:false,resizeDelay:10},copy='<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',typographyStyles=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],mirrored,mirror=$(copy).data("autosize",true)[0];mirror.style.lineHeight="99px";if($(mirror).css("lineHeight")==="99px"){typographyStyles.push("lineHeight")}mirror.style.lineHeight="";$.fn.autosize=function(options){if(!this.length){return this}options=$.extend({},defaults,options||{});if(mirror.parentNode!==document.body){$(document.body).append(mirror)}return this.each(function(){var ta=this,$ta=$(ta),maxHeight,minHeight,boxOffset=0,callback=$.isFunction(options.callback),originalStyles={height:ta.style.height,overflow:ta.style.overflow,overflowY:ta.style.overflowY,wordWrap:ta.style.wordWrap,resize:ta.style.resize},timeout,width=$ta.width();if($ta.data("autosize")){return}$ta.data("autosize",true);if($ta.css("box-sizing")==="border-box"||$ta.css("-moz-box-sizing")==="border-box"||$ta.css("-webkit-box-sizing")==="border-box"){boxOffset=$ta.outerHeight()-$ta.height()}minHeight=Math.max(parseInt($ta.css("minHeight"),10)-boxOffset||0,$ta.height());$ta.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word",resize:$ta.css("resize")==="none"||$ta.css("resize")==="vertical"?"none":"horizontal"});function setWidth(){var style,width;if("getComputedStyle"in window){style=window.getComputedStyle(ta,null);width=ta.getBoundingClientRect().width;$.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(i,val){width-=parseInt(style[val],10)});mirror.style.width=width+"px"}else{mirror.style.width=Math.max($ta.width(),0)+"px"}}function initMirror(){var styles={};mirrored=ta;mirror.className=options.className;maxHeight=parseInt($ta.css("maxHeight"),10);$.each(typographyStyles,function(i,val){styles[val]=$ta.css(val)});$(mirror).css(styles);setWidth();if(window.chrome){var width=ta.style.width;ta.style.width="0px";var ignore=ta.offsetWidth;ta.style.width=width}}function adjust(){var height,original;if(mirrored!==ta){initMirror()}else{setWidth()}mirror.value=ta.value+options.append;mirror.style.overflowY=ta.style.overflowY;original=parseInt(ta.style.height,10);mirror.scrollTop=0;mirror.scrollTop=9e4;height=mirror.scrollTop;if(maxHeight&&height>maxHeight){ta.style.overflowY="scroll";height=maxHeight}else{ta.style.overflowY="hidden";if(height<minHeight){height=minHeight}}height+=boxOffset;if(original!==height){ta.style.height=height+"px";if(callback){options.callback.call(ta,ta)}}}function resize(){clearTimeout(timeout);timeout=setTimeout(function(){var newWidth=$ta.width();if(newWidth!==width){width=newWidth;adjust()}},parseInt(options.resizeDelay,10))}if("onpropertychange"in ta){if("oninput"in ta){$ta.on("input.autosize keyup.autosize",adjust)}else{$ta.on("propertychange.autosize",function(){if(event.propertyName==="value"){adjust()}})}}else{$ta.on("input.autosize",adjust)}if(options.resizeDelay!==false){$(window).on("resize.autosize",resize)}$ta.on("autosize.resize",adjust);$ta.on("autosize.resizeIncludeStyle",function(){mirrored=null;adjust()});$ta.on("autosize.destroy",function(){mirrored=null;clearTimeout(timeout);$(window).off("resize",resize);$ta.off("autosize").off(".autosize").css(originalStyles).removeData("autosize")});adjust()})}})(window.jQuery||window.$);
2
-//# sourceMappingURL=jquery.autosize.min.map

+ 0
- 1
libs/jquery.autosize.min.map Dosyayı Görüntüle

1
-{"version":3,"file":"jquery.autosize.min.js","sources":["jquery.autosize.js"],"names":["$","defaults","className","append","callback","resizeDelay","copy","typographyStyles","mirrored","mirror","data","style","lineHeight","css","push","fn","autosize","options","this","length","extend","parentNode","document","body","each","ta","$ta","maxHeight","minHeight","boxOffset","isFunction","originalStyles","height","overflow","overflowY","wordWrap","resize","timeout","width","outerHeight","Math","max","parseInt","setWidth","window","getComputedStyle","getBoundingClientRect","i","val","initMirror","styles","chrome","ignore","offsetWidth","adjust","original","value","scrollTop","call","clearTimeout","setTimeout","newWidth","on","event","propertyName","off","removeData","jQuery"],"mappings":"CAMC,SAAUA,GACV,GACAC,WACCC,UAAW,aACXC,OAAQ,GACRC,SAAU,MACVC,YAAa,IAIdC,KAAO,oWAGPC,kBACC,aACA,WACA,aACA,YACA,gBACA,gBACA,cACA,cAIDC,SAGAC,OAAST,EAAEM,MAAMI,KAAK,WAAY,MAAM,EAGxCD,QAAOE,MAAMC,WAAa,MAC1B,IAAIZ,EAAES,QAAQI,IAAI,gBAAkB,OAAQ,CAC3CN,iBAAiBO,KAAK,cAEvBL,OAAOE,MAAMC,WAAa,EAE1BZ,GAAEe,GAAGC,SAAW,SAAUC,SACzB,IAAKC,KAAKC,OAAQ,CACjB,MAAOD,MAGRD,QAAUjB,EAAEoB,UAAWnB,SAAUgB,YAEjC,IAAIR,OAAOY,aAAeC,SAASC,KAAM,CACxCvB,EAAEsB,SAASC,MAAMpB,OAAOM,QAGzB,MAAOS,MAAKM,KAAK,WAChB,GACAC,IAAKP,KACLQ,IAAM1B,EAAEyB,IACRE,UACAC,UACAC,UAAY,EACZzB,SAAWJ,EAAE8B,WAAWb,QAAQb,UAChC2B,gBACCC,OAAQP,GAAGd,MAAMqB,OACjBC,SAAUR,GAAGd,MAAMsB,SACnBC,UAAWT,GAAGd,MAAMuB,UACpBC,SAAUV,GAAGd,MAAMwB,SACnBC,OAAQX,GAAGd,MAAMyB,QAElBC,QACAC,MAAQZ,IAAIY,OAEZ,IAAIZ,IAAIhB,KAAK,YAAa,CAEzB,OAEDgB,IAAIhB,KAAK,WAAY,KAErB,IAAIgB,IAAIb,IAAI,gBAAkB,cAAgBa,IAAIb,IAAI,qBAAuB,cAAgBa,IAAIb,IAAI,wBAA0B,aAAa,CAC3IgB,UAAYH,IAAIa,cAAgBb,IAAIM,SAIrCJ,UAAYY,KAAKC,IAAIC,SAAShB,IAAIb,IAAI,aAAc,IAAMgB,WAAa,EAAGH,IAAIM,SAE9EN,KAAIb,KACHoB,SAAU,SACVC,UAAW,SACXC,SAAU,aACVC,OAASV,IAAIb,IAAI,YAAc,QAAUa,IAAIb,IAAI,YAAc,WAAc,OAAS,cAIvF,SAAS8B,YACR,GAAIhC,OAAO2B,KAEX,IAAI,oBAAsBM,QAAQ,CACjCjC,MAAQiC,OAAOC,iBAAiBpB,GAAI,KACpCa,OAAQb,GAAGqB,wBAAwBR,KAEnCtC,GAAEwB,MAAM,cAAe,eAAgB,kBAAmB,oBAAqB,SAASuB,EAAEC,KACzFV,OAASI,SAAS/B,MAAMqC,KAAK,KAG9BvC,QAAOE,MAAM2B,MAAQA,MAAQ,SAEzB,CAEJ7B,OAAOE,MAAM2B,MAAQE,KAAKC,IAAIf,IAAIY,QAAS,GAAK,MAIlD,QAASW,cACR,GAAIC,UAEJ1C,UAAWiB,EACXhB,QAAOP,UAAYe,QAAQf,SAC3ByB,WAAYe,SAAShB,IAAIb,IAAI,aAAc,GAO3Cb,GAAEwB,KAAKjB,iBAAkB,SAASwC,EAAEC,KACnCE,OAAOF,KAAOtB,IAAIb,IAAImC,MAEvBhD,GAAES,QAAQI,IAAIqC,OAEdP,WAKA,IAAIC,OAAOO,OAAQ,CAClB,GAAIb,OAAQb,GAAGd,MAAM2B,KACrBb,IAAGd,MAAM2B,MAAQ,KACjB,IAAIc,QAAS3B,GAAG4B,WAChB5B,IAAGd,MAAM2B,MAAQA,OAMnB,QAASgB,UACR,GAAItB,QAAQuB,QAEZ,IAAI/C,WAAaiB,GAAI,CACpBwB,iBACM,CACNN,WAGDlC,OAAO+C,MAAQ/B,GAAG+B,MAAQvC,QAAQd,MAClCM,QAAOE,MAAMuB,UAAYT,GAAGd,MAAMuB,SAClCqB,UAAWb,SAASjB,GAAGd,MAAMqB,OAAO,GAGpCvB,QAAOgD,UAAY,CAEnBhD,QAAOgD,UAAY,GAGnBzB,QAASvB,OAAOgD,SAEhB,IAAI9B,WAAaK,OAASL,UAAW,CACpCF,GAAGd,MAAMuB,UAAY,QACrBF,QAASL,cACH,CACNF,GAAGd,MAAMuB,UAAY,QACrB,IAAIF,OAASJ,UAAW,CACvBI,OAASJ,WAIXI,QAAUH,SAEV,IAAI0B,WAAavB,OAAQ,CACxBP,GAAGd,MAAMqB,OAASA,OAAS,IAC3B,IAAI5B,SAAU,CACba,QAAQb,SAASsD,KAAKjC,GAAGA,MAK5B,QAASW,UACRuB,aAAatB,QACbA,SAAUuB,WAAW,WACpB,GAAIC,UAAWnC,IAAIY,OAEnB,IAAIuB,WAAavB,MAAO,CACvBA,MAAQuB,QACRP,YAECZ,SAASzB,QAAQZ,YAAY,KAGjC,GAAI,oBAAsBoB,IAAI,CAC7B,GAAI,WAAaA,IAAI,CAIpBC,IAAIoC,GAAG,gCAAiCR,YAClC,CAEN5B,IAAIoC,GAAG,0BAA2B,WACjC,GAAGC,MAAMC,eAAiB,QAAQ,CACjCV,iBAIG,CAEN5B,IAAIoC,GAAG,iBAAkBR,QAM1B,GAAIrC,QAAQZ,cAAgB,MAAO,CAClCL,EAAE4C,QAAQkB,GAAG,kBAAmB1B,QAKjCV,IAAIoC,GAAG,kBAAmBR,OAI1B5B,KAAIoC,GAAG,8BAA+B,WACrCtD,SAAW,IACX8C,WAGD5B,KAAIoC,GAAG,mBAAoB,WAC1BtD,SAAW,IACXmD,cAAatB,QACbrC,GAAE4C,QAAQqB,IAAI,SAAU7B,OACxBV,KACEuC,IAAI,YACJA,IAAI,aACJpD,IAAIkB,gBACJmC,WAAW,aAIdZ,eAGDV,OAAOuB,QAAUvB,OAAO5C"}

+ 0
- 110
libs/popover.js Dosyayı Görüntüle

1
-/* ========================================================================
2
- * Bootstrap: popover.js v3.1.1
3
- * http://getbootstrap.com/javascript/#popovers
4
- * ========================================================================
5
- * Copyright 2011-2014 Twitter, Inc.
6
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
- * ======================================================================== */
8
-
9
-
10
-+function ($) {
11
-  'use strict';
12
-
13
-  // POPOVER PUBLIC CLASS DEFINITION
14
-  // ===============================
15
-
16
-  var Popover = function (element, options) {
17
-    this.init('popover', element, options)
18
-  }
19
-
20
-  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
21
-
22
-  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
23
-    placement: 'right',
24
-    trigger: 'click',
25
-    content: '',
26
-    template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
27
-  })
28
-
29
-
30
-  // NOTE: POPOVER EXTENDS tooltip.js
31
-  // ================================
32
-
33
-  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
34
-
35
-  Popover.prototype.constructor = Popover
36
-
37
-  Popover.prototype.getDefaults = function () {
38
-    return Popover.DEFAULTS
39
-  }
40
-
41
-  Popover.prototype.setContent = function () {
42
-    var $tip    = this.tip()
43
-    var title   = this.getTitle()
44
-    var content = this.getContent()
45
-
46
-    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
47
-    $tip.find('.popover-content')[ // we use append for html objects to maintain js events
48
-      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
49
-    ](content)
50
-
51
-    $tip.removeClass('fade top bottom left right in')
52
-
53
-    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
54
-    // this manually by checking the contents.
55
-    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
56
-  }
57
-
58
-  Popover.prototype.hasContent = function () {
59
-    return this.getTitle() || this.getContent()
60
-  }
61
-
62
-  Popover.prototype.getContent = function () {
63
-    var $e = this.$element
64
-    var o  = this.options
65
-
66
-    return $e.attr('data-content')
67
-      || (typeof o.content == 'function' ?
68
-            o.content.call($e[0]) :
69
-            o.content)
70
-  }
71
-
72
-  Popover.prototype.arrow = function () {
73
-    return this.$arrow = this.$arrow || this.tip().find('.arrow')
74
-  }
75
-
76
-  Popover.prototype.tip = function () {
77
-    if (!this.$tip) this.$tip = $(this.options.template)
78
-    return this.$tip
79
-  }
80
-
81
-
82
-  // POPOVER PLUGIN DEFINITION
83
-  // =========================
84
-
85
-  var old = $.fn.popover
86
-
87
-  $.fn.popover = function (option) {
88
-    return this.each(function () {
89
-      var $this   = $(this)
90
-      var data    = $this.data('bs.popover')
91
-      var options = typeof option == 'object' && option
92
-
93
-      if (!data && option == 'destroy') return
94
-      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
95
-      if (typeof option == 'string') data[option]()
96
-    })
97
-  }
98
-
99
-  $.fn.popover.Constructor = Popover
100
-
101
-
102
-  // POPOVER NO CONFLICT
103
-  // ===================
104
-
105
-  $.fn.popover.noConflict = function () {
106
-    $.fn.popover = old
107
-    return this
108
-  }
109
-
110
-}(jQuery);

+ 0
- 2
libs/popover.min.js Dosyayı Görüntüle

1
-+function($){"use strict";var Popover=function(element,options){this.init("popover",element,options)};if(!$.fn.tooltip)throw new Error("Popover requires tooltip.js");Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'});Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype);Popover.prototype.constructor=Popover;Popover.prototype.getDefaults=function(){return Popover.DEFAULTS};Popover.prototype.setContent=function(){var $tip=this.tip();var title=this.getTitle();var content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title);$tip.find(".popover-content")[this.options.html?typeof content=="string"?"html":"append":"text"](content);$tip.removeClass("fade top bottom left right in");if(!$tip.find(".popover-title").html())$tip.find(".popover-title").hide()};Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()};Popover.prototype.getContent=function(){var $e=this.$element;var o=this.options;return $e.attr("data-content")||(typeof o.content=="function"?o.content.call($e[0]):o.content)};Popover.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};Popover.prototype.tip=function(){if(!this.$tip)this.$tip=$(this.options.template);return this.$tip};var old=$.fn.popover;$.fn.popover=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.popover");var options=typeof option=="object"&&option;if(!data&&option=="destroy")return;if(!data)$this.data("bs.popover",data=new Popover(this,options));if(typeof option=="string")data[option]()})};$.fn.popover.Constructor=Popover;$.fn.popover.noConflict=function(){$.fn.popover=old;return this}}(jQuery);
2
-//# sourceMappingURL=popover.min.map

+ 0
- 1
libs/popover.min.map Dosyayı Görüntüle

1
-{"version":3,"file":"popover.min.js","sources":["popover.js"],"names":["$","Popover","element","options","this","init","fn","tooltip","Error","DEFAULTS","extend","Constructor","placement","trigger","content","template","prototype","constructor","getDefaults","setContent","$tip","tip","title","getTitle","getContent","find","html","removeClass","hide","hasContent","$e","$element","o","attr","call","arrow","$arrow","old","popover","option","each","$this","data","noConflict","jQuery"],"mappings":"CASC,SAAUA,GACT,YAKA,IAAIC,SAAU,SAAUC,QAASC,SAC/BC,KAAKC,KAAK,UAAWH,QAASC,SAGhC,KAAKH,EAAEM,GAAGC,QAAS,KAAM,IAAIC,OAAM,8BAEnCP,SAAQQ,SAAWT,EAAEU,UAAWV,EAAEM,GAAGC,QAAQI,YAAYF,UACvDG,UAAW,QACXC,QAAS,QACTC,QAAS,GACTC,SAAU,0HAOZd,SAAQe,UAAYhB,EAAEU,UAAWV,EAAEM,GAAGC,QAAQI,YAAYK,UAE1Df,SAAQe,UAAUC,YAAchB,OAEhCA,SAAQe,UAAUE,YAAc,WAC9B,MAAOjB,SAAQQ,SAGjBR,SAAQe,UAAUG,WAAa,WAC7B,GAAIC,MAAUhB,KAAKiB,KACnB,IAAIC,OAAUlB,KAAKmB,UACnB,IAAIT,SAAUV,KAAKoB,YAEnBJ,MAAKK,KAAK,kBAAkBrB,KAAKD,QAAQuB,KAAO,OAAS,QAAQJ,MACjEF,MAAKK,KAAK,oBACRrB,KAAKD,QAAQuB,WAAeZ,UAAW,SAAW,OAAS,SAAY,QACvEA,QAEFM,MAAKO,YAAY,gCAIjB,KAAKP,KAAKK,KAAK,kBAAkBC,OAAQN,KAAKK,KAAK,kBAAkBG,OAGvE3B,SAAQe,UAAUa,WAAa,WAC7B,MAAOzB,MAAKmB,YAAcnB,KAAKoB,aAGjCvB,SAAQe,UAAUQ,WAAa,WAC7B,GAAIM,IAAK1B,KAAK2B,QACd,IAAIC,GAAK5B,KAAKD,OAEd,OAAO2B,IAAGG,KAAK,wBACFD,GAAElB,SAAW,WAClBkB,EAAElB,QAAQoB,KAAKJ,GAAG,IAClBE,EAAElB,SAGZb,SAAQe,UAAUmB,MAAQ,WACxB,MAAO/B,MAAKgC,OAAShC,KAAKgC,QAAUhC,KAAKiB,MAAMI,KAAK,UAGtDxB,SAAQe,UAAUK,IAAM,WACtB,IAAKjB,KAAKgB,KAAMhB,KAAKgB,KAAOpB,EAAEI,KAAKD,QAAQY,SAC3C,OAAOX,MAAKgB,KAOd,IAAIiB,KAAMrC,EAAEM,GAAGgC,OAEftC,GAAEM,GAAGgC,QAAU,SAAUC,QACvB,MAAOnC,MAAKoC,KAAK,WACf,GAAIC,OAAUzC,EAAEI,KAChB,IAAIsC,MAAUD,MAAMC,KAAK,aACzB,IAAIvC,eAAiBoC,SAAU,UAAYA,MAE3C,KAAKG,MAAQH,QAAU,UAAW,MAClC,KAAKG,KAAMD,MAAMC,KAAK,aAAeA,KAAO,GAAIzC,SAAQG,KAAMD,SAC9D,UAAWoC,SAAU,SAAUG,KAAKH,YAIxCvC,GAAEM,GAAGgC,QAAQ3B,YAAcV,OAM3BD,GAAEM,GAAGgC,QAAQK,WAAa,WACxB3C,EAAEM,GAAGgC,QAAUD,GACf,OAAOjC,QAGTwC"}

+ 0
- 1
libs/strophe/strophe.caps.jsonly.min.js Dosyayı Görüntüle

1
-Strophe.addConnectionPlugin("caps",{HASH:"sha-1",node:"http://strophe.im/strophejs/",_ver:"",_connection:null,_knownCapabilities:{},_jidVerIndex:{},init:function(conn){this._connection=conn;Strophe.addNamespace("CAPS","http://jabber.org/protocol/caps");if(!this._connection.disco){throw"Caps plugin requires the disco plugin to be installed."}this._connection.disco.addFeature(Strophe.NS.CAPS);this._connection.addHandler(this._delegateCapabilities.bind(this),Strophe.NS.CAPS)},generateCapsAttrs:function(){return{xmlns:Strophe.NS.CAPS,hash:this.HASH,node:this.node,ver:this.generateVer()}},generateVer:function(){if(this._ver!==""){return this._ver}var ver="",identities=this._connection.disco._identities.sort(this._sortIdentities),identitiesLen=identities.length,features=this._connection.disco._features.sort(),featuresLen=features.length;for(var i=0;i<identitiesLen;i++){var curIdent=identities[i];ver+=curIdent.category+"/"+curIdent.type+"/"+curIdent.lang+"/"+curIdent.name+"<"}for(var i=0;i<featuresLen;i++){ver+=features[i]+"<"}this._ver=b64_sha1(ver);return this._ver},getCapabilitiesByJid:function(jid){if(this._jidVerIndex[jid]){return this._knownCapabilities[this._jidVerIndex[jid]]}return null},_delegateCapabilities:function(stanza){var from=stanza.getAttribute("from"),c=stanza.querySelector("c"),ver=c.getAttribute("ver"),node=c.getAttribute("node");if(!this._knownCapabilities[ver]){return this._requestCapabilities(from,node,ver)}else{this._jidVerIndex[from]=ver}if(!this._jidVerIndex[from]||!this._jidVerIndex[from]!==ver){this._jidVerIndex[from]=ver}return true},_requestCapabilities:function(to,node,ver){if(to!==this._connection.jid){var id=this._connection.disco.info(to,node+"#"+ver);this._connection.addHandler(this._handleDiscoInfoReply.bind(this),Strophe.NS.DISCO_INFO,"iq","result",id,to)}return true},_handleDiscoInfoReply:function(stanza){var query=stanza.querySelector("query"),node=query.getAttribute("node").split("#"),ver=node[1],from=stanza.getAttribute("from");if(!this._knownCapabilities[ver]){var childNodes=query.childNodes,childNodesLen=childNodes.length;this._knownCapabilities[ver]=[];for(var i=0;i<childNodesLen;i++){var node=childNodes[i];this._knownCapabilities[ver].push({name:node.nodeName,attributes:node.attributes})}this._jidVerIndex[from]=ver}else{if(!this._jidVerIndex[from]||!this._jidVerIndex[from]!==ver){this._jidVerIndex[from]=ver}}return false},_sortIdentities:function(a,b){if(a.category>b.category){return 1}if(a.category<b.category){return -1}if(a.type>b.type){return 1}if(a.type<b.type){return -1}if(a.lang>b.lang){return 1}if(a.lang<b.lang){return -1}return 0}});

+ 0
- 1
libs/strophe/strophe.disco.min.js Dosyayı Görüntüle

1
-Strophe.addConnectionPlugin("disco",{_connection:null,_identities:[],_features:[],_items:[],init:function(conn){this._connection=conn;this._identities=[];this._features=[];this._items=[];conn.addHandler(this._onDiscoInfo.bind(this),Strophe.NS.DISCO_INFO,"iq","get",null,null);conn.addHandler(this._onDiscoItems.bind(this),Strophe.NS.DISCO_ITEMS,"iq","get",null,null)},addIdentity:function(category,type,name,lang){for(var i=0;i<this._identities.length;i++){if(this._identities[i].category==category&&this._identities[i].type==type&&this._identities[i].name==name&&this._identities[i].lang==lang){return false}}this._identities.push({category:category,type:type,name:name,lang:lang});return true},addFeature:function(var_name){for(var i=0;i<this._features.length;i++){if(this._features[i]==var_name){return false}}this._features.push(var_name);return true},removeFeature:function(var_name){for(var i=0;i<this._features.length;i++){if(this._features[i]===var_name){this._features.splice(i,1);return true}}return false},addItem:function(jid,name,node,call_back){if(node&&!call_back){return false}this._items.push({jid:jid,name:name,node:node,call_back:call_back});return true},info:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_INFO};if(node){attrs.node=node}var info=$iq({from:this._connection.jid,to:jid,type:"get"}).c("query",attrs);this._connection.sendIQ(info,success,error,timeout)},items:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_ITEMS};if(node){attrs.node=node}var items=$iq({from:this._connection.jid,to:jid,type:"get"}).c("query",attrs);this._connection.sendIQ(items,success,error,timeout)},_buildIQResult:function(stanza,query_attrs){var id=stanza.getAttribute("id");var from=stanza.getAttribute("from");var iqresult=$iq({type:"result",id:id});if(from!==null){iqresult.attrs({to:from})}return iqresult.c("query",query_attrs)},_onDiscoInfo:function(stanza){var node=stanza.getElementsByTagName("query")[0].getAttribute("node");var attrs={xmlns:Strophe.NS.DISCO_INFO};if(node){attrs.node=node}var iqresult=this._buildIQResult(stanza,attrs);for(var i=0;i<this._identities.length;i++){var attrs={category:this._identities[i].category,type:this._identities[i].type};if(this._identities[i].name){attrs.name=this._identities[i].name}if(this._identities[i].lang){attrs["xml:lang"]=this._identities[i].lang}iqresult.c("identity",attrs).up()}for(var i=0;i<this._features.length;i++){iqresult.c("feature",{"var":this._features[i]}).up()}this._connection.send(iqresult.tree());return true},_onDiscoItems:function(stanza){var query_attrs={xmlns:Strophe.NS.DISCO_ITEMS};var node=stanza.getElementsByTagName("query")[0].getAttribute("node");if(node){query_attrs.node=node;var items=[];for(var i=0;i<this._items.length;i++){if(this._items[i].node==node){items=this._items[i].call_back(stanza);break}}}else{var items=this._items}var iqresult=this._buildIQResult(stanza,query_attrs);for(var i=0;i<items.length;i++){var attrs={jid:items[i].jid};if(items[i].name){attrs.name=items[i].name}if(items[i].node){attrs.node=items[i].node}iqresult.c("item",attrs).up()}this._connection.send(iqresult.tree());return true}});

+ 0
- 3
libs/strophe/strophe.min.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 342
libs/toastr.js Dosyayı Görüntüle

1
-/*
2
- * Toastr
3
- * Copyright 2012-2014 John Papa and Hans Fjällemark.
4
- * All Rights Reserved.
5
- * Use, reproduction, distribution, and modification of this code is subject to the terms and
6
- * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
7
- *
8
- * Author: John Papa and Hans Fjällemark
9
- * ARIA Support: Greta Krafsig
10
- * Project: https://github.com/CodeSeven/toastr
11
- */
12
-; (function (define) {
13
-    define(['jquery'], function ($) {
14
-        return (function () {
15
-            var $container;
16
-            var listener;
17
-            var toastId = 0;
18
-            var toastType = {
19
-                error: 'error',
20
-                info: 'info',
21
-                success: 'success',
22
-                warning: 'warning'
23
-            };
24
-
25
-            var toastr = {
26
-                clear: clear,
27
-                remove: remove,
28
-                error: error,
29
-                getContainer: getContainer,
30
-                info: info,
31
-                options: {},
32
-                subscribe: subscribe,
33
-                success: success,
34
-                version: '2.0.3',
35
-                warning: warning
36
-            };
37
-
38
-            return toastr;
39
-
40
-            //#region Accessible Methods
41
-            function error(message, title, optionsOverride) {
42
-                return notify({
43
-                    type: toastType.error,
44
-                    iconClass: getOptions().iconClasses.error,
45
-                    message: message,
46
-                    optionsOverride: optionsOverride,
47
-                    title: title
48
-                });
49
-            }
50
-
51
-            function getContainer(options, create) {
52
-                if (!options) { options = getOptions(); }
53
-                $container = $('#' + options.containerId);
54
-                if ($container.length) {
55
-                    return $container;
56
-                }
57
-                if(create) {
58
-                    $container = createContainer(options);
59
-                }
60
-                return $container;
61
-            }
62
-
63
-            function info(message, title, optionsOverride) {
64
-                return notify({
65
-                    type: toastType.info,
66
-                    iconClass: getOptions().iconClasses.info,
67
-                    message: message,
68
-                    optionsOverride: optionsOverride,
69
-                    title: title
70
-                });
71
-            }
72
-
73
-            function subscribe(callback) {
74
-                listener = callback;
75
-            }
76
-
77
-            function success(message, title, optionsOverride) {
78
-                return notify({
79
-                    type: toastType.success,
80
-                    iconClass: getOptions().iconClasses.success,
81
-                    message: message,
82
-                    optionsOverride: optionsOverride,
83
-                    title: title
84
-                });
85
-            }
86
-
87
-            function warning(message, title, optionsOverride) {
88
-                return notify({
89
-                    type: toastType.warning,
90
-                    iconClass: getOptions().iconClasses.warning,
91
-                    message: message,
92
-                    optionsOverride: optionsOverride,
93
-                    title: title
94
-                });
95
-            }
96
-
97
-            function clear($toastElement) {
98
-                var options = getOptions();
99
-                if (!$container) { getContainer(options); }
100
-                if (!clearToast($toastElement, options)) {
101
-                    clearContainer(options);
102
-                }
103
-            }
104
-
105
-            function remove($toastElement) {
106
-                var options = getOptions();
107
-                if (!$container) { getContainer(options); }
108
-                if ($toastElement && $(':focus', $toastElement).length === 0) {
109
-                    removeToast($toastElement);
110
-                    return;
111
-                }
112
-                if ($container.children().length) {
113
-                    $container.remove();
114
-                }
115
-            }
116
-            //#endregion
117
-
118
-            //#region Internal Methods
119
-
120
-            function clearContainer(options){
121
-                var toastsToClear = $container.children();
122
-                for (var i = toastsToClear.length - 1; i >= 0; i--) {
123
-                    clearToast($(toastsToClear[i]), options);
124
-                };
125
-            }
126
-
127
-            function clearToast($toastElement, options){
128
-                if ($toastElement && $(':focus', $toastElement).length === 0) {
129
-                    $toastElement[options.hideMethod]({
130
-                        duration: options.hideDuration,
131
-                        easing: options.hideEasing,
132
-                        complete: function () { removeToast($toastElement); }
133
-                    });
134
-                    return true;
135
-                }
136
-                return false;
137
-            }
138
-
139
-            function createContainer(options) {
140
-                $container = $('<div/>')
141
-                    .attr('id', options.containerId)
142
-                    .addClass(options.positionClass)
143
-                    .attr('aria-live', 'polite')
144
-                    .attr('role', 'alert');
145
-
146
-                $container.appendTo($(options.target));
147
-                return $container;
148
-            }
149
-
150
-            function getDefaults() {
151
-                return {
152
-                    tapToDismiss: true,
153
-                    toastClass: 'toast',
154
-                    containerId: 'toast-container',
155
-                    debug: false,
156
-
157
-                    showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
158
-                    showDuration: 300,
159
-                    showEasing: 'swing', //swing and linear are built into jQuery
160
-                    onShown: undefined,
161
-                    hideMethod: 'fadeOut',
162
-                    hideDuration: 1000,
163
-                    hideEasing: 'swing',
164
-                    onHidden: undefined,
165
-
166
-                    extendedTimeOut: 1000,
167
-                    iconClasses: {
168
-                        error: 'toast-error',
169
-                        info: 'toast-info',
170
-                        success: 'toast-success',
171
-                        warning: 'toast-warning'
172
-                    },
173
-                    iconClass: 'toast-info',
174
-                    positionClass: 'toast-top-right',
175
-                    timeOut: 5000, // Set timeOut and extendedTimeout to 0 to make it sticky
176
-                    titleClass: 'toast-title',
177
-                    messageClass: 'toast-message',
178
-                    target: 'body',
179
-                    closeHtml: '<button>&times;</button>',
180
-                    newestOnTop: true
181
-                };
182
-            }
183
-
184
-            function publish(args) {
185
-                if (!listener) { return; }
186
-                listener(args);
187
-            }
188
-
189
-            function notify(map) {
190
-                var options = getOptions(),
191
-                    iconClass = map.iconClass || options.iconClass;
192
-
193
-                if (typeof (map.optionsOverride) !== 'undefined') {
194
-                    options = $.extend(options, map.optionsOverride);
195
-                    iconClass = map.optionsOverride.iconClass || iconClass;
196
-                }
197
-
198
-                toastId++;
199
-
200
-                $container = getContainer(options, true);
201
-                var intervalId = null,
202
-                    $toastElement = $('<div/>'),
203
-                    $titleElement = $('<div/>'),
204
-                    $messageElement = $('<div/>'),
205
-                    $closeElement = $(options.closeHtml),
206
-                    response = {
207
-                        toastId: toastId,
208
-                        state: 'visible',
209
-                        startTime: new Date(),
210
-                        options: options,
211
-                        map: map
212
-                    };
213
-
214
-                if (map.iconClass) {
215
-                    $toastElement.addClass(options.toastClass).addClass(iconClass);
216
-                }
217
-
218
-                if (map.title) {
219
-                    $titleElement.append(map.title).addClass(options.titleClass);
220
-                    $toastElement.append($titleElement);
221
-                }
222
-
223
-                if (map.message) {
224
-                    $messageElement.append(map.message).addClass(options.messageClass);
225
-                    $toastElement.append($messageElement);
226
-                }
227
-
228
-                if (options.closeButton) {
229
-                    $closeElement.addClass('toast-close-button').attr("role", "button");
230
-                    $toastElement.prepend($closeElement);
231
-                }
232
-
233
-                if (options.reposition) {
234
-                    options.reposition();
235
-                }
236
-
237
-                $toastElement.hide();
238
-                if (options.newestOnTop) {
239
-                    $container.prepend($toastElement);
240
-                } else {
241
-                    $container.append($toastElement);
242
-                }
243
-
244
-
245
-                $toastElement[options.showMethod](
246
-                    { duration: options.showDuration, easing: options.showEasing, complete: options.onShown }
247
-                );
248
-
249
-                if (options.timeOut > 0) {
250
-                    intervalId = setTimeout(hideToast, options.timeOut);
251
-                }
252
-
253
-                $toastElement.hover(stickAround, delayedHideToast);
254
-                if (!options.onclick && options.tapToDismiss) {
255
-                    $toastElement.click(hideToast);
256
-                }
257
-
258
-                if (options.closeButton && $closeElement) {
259
-                    $closeElement.click(function (event) {
260
-                        if( event.stopPropagation ) {
261
-                            event.stopPropagation();
262
-                        } else if( event.cancelBubble !== undefined && event.cancelBubble !== true ) {
263
-                            event.cancelBubble = true;
264
-                        }
265
-                        hideToast(true);
266
-                    });
267
-                }
268
-
269
-                if (options.onclick) {
270
-                    $toastElement.click(function () {
271
-                        options.onclick();
272
-                        hideToast();
273
-                    });
274
-                }
275
-
276
-                publish(response);
277
-
278
-                if (options.debug && console) {
279
-                    console.log(response);
280
-                }
281
-
282
-                return $toastElement;
283
-
284
-                function hideToast(override) {
285
-                    if ($(':focus', $toastElement).length && !override) {
286
-                        return;
287
-                    }
288
-                    return $toastElement[options.hideMethod]({
289
-                        duration: options.hideDuration,
290
-                        easing: options.hideEasing,
291
-                        complete: function () {
292
-                            removeToast($toastElement);
293
-                            if (options.onHidden && response.state !== 'hidden') {
294
-                                options.onHidden();
295
-                            }
296
-                            response.state = 'hidden';
297
-                            response.endTime = new Date();
298
-                            publish(response);
299
-                        }
300
-                    });
301
-                }
302
-
303
-                function delayedHideToast() {
304
-                    if (options.timeOut > 0 || options.extendedTimeOut > 0) {
305
-                        intervalId = setTimeout(hideToast, options.extendedTimeOut);
306
-                    }
307
-                }
308
-
309
-                function stickAround() {
310
-                    clearTimeout(intervalId);
311
-                    $toastElement.stop(true, true)[options.showMethod](
312
-                        { duration: options.showDuration, easing: options.showEasing }
313
-                    );
314
-                }
315
-            }
316
-
317
-            function getOptions() {
318
-                return $.extend({}, getDefaults(), toastr.options);
319
-            }
320
-
321
-            function removeToast($toastElement) {
322
-                if (!$container) { $container = getContainer(); }
323
-                if ($toastElement.is(':visible')) {
324
-                    return;
325
-                }
326
-                $toastElement.remove();
327
-                $toastElement = null;
328
-                if ($container.children().length === 0) {
329
-                    $container.remove();
330
-                }
331
-            }
332
-            //#endregion
333
-
334
-        })();
335
-    });
336
-}(typeof define === 'function' && define.amd ? define : function (deps, factory) {
337
-    if (typeof module !== 'undefined' && module.exports) { //Node
338
-        module.exports = factory(require('jquery'));
339
-    } else {
340
-        window['toastr'] = factory(window['jQuery']);
341
-    }
342
-}));

+ 0
- 2
libs/toastr.min.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 1
libs/toastr.min.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 422
libs/tooltip.js Dosyayı Görüntüle

1
-/* ========================================================================
2
- * Bootstrap: tooltip.js v3.1.1
3
- * http://getbootstrap.com/javascript/#tooltip
4
- * Inspired by the original jQuery.tipsy by Jason Frame
5
- * ========================================================================
6
- * Copyright 2011-2014 Twitter, Inc.
7
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
8
- * ======================================================================== */
9
-
10
-
11
-+function ($) {
12
-  'use strict';
13
-
14
-  // TOOLTIP PUBLIC CLASS DEFINITION
15
-  // ===============================
16
-
17
-  var Tooltip = function (element, options) {
18
-    this.type       =
19
-    this.options    =
20
-    this.enabled    =
21
-    this.timeout    =
22
-    this.hoverState =
23
-    this.$element   = null
24
-
25
-    this.init('tooltip', element, options)
26
-  }
27
-
28
-  Tooltip.DEFAULTS = {
29
-    animation: true,
30
-    placement: 'top',
31
-    selector: false,
32
-    template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
33
-    trigger: 'hover focus',
34
-    title: '',
35
-    delay: 0,
36
-    html: false,
37
-    container: false
38
-  }
39
-
40
-  Tooltip.prototype.init = function (type, element, options) {
41
-    this.enabled  = true
42
-    this.type     = type
43
-    this.$element = $(element)
44
-    this.options  = this.getOptions(options)
45
-
46
-    var triggers = this.options.trigger.split(' ')
47
-
48
-    for (var i = triggers.length; i--;) {
49
-      var trigger = triggers[i]
50
-
51
-      if (trigger == 'click') {
52
-        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
53
-      } else if (trigger != 'manual') {
54
-        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
55
-        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
56
-
57
-        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
58
-        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
59
-      }
60
-    }
61
-
62
-    this.options.selector ?
63
-      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
64
-      this.fixTitle()
65
-  }
66
-
67
-  Tooltip.prototype.getDefaults = function () {
68
-    return Tooltip.DEFAULTS
69
-  }
70
-
71
-  Tooltip.prototype.getOptions = function (options) {
72
-    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
73
-
74
-    if (options.delay && typeof options.delay == 'number') {
75
-      options.delay = {
76
-        show: options.delay,
77
-        hide: options.delay
78
-      }
79
-    }
80
-
81
-    return options
82
-  }
83
-
84
-  Tooltip.prototype.getDelegateOptions = function () {
85
-    var options  = {}
86
-    var defaults = this.getDefaults()
87
-
88
-    this._options && $.each(this._options, function (key, value) {
89
-      if (defaults[key] != value) options[key] = value
90
-    })
91
-
92
-    return options
93
-  }
94
-
95
-  Tooltip.prototype.enter = function (obj) {
96
-    var self = obj instanceof this.constructor ?
97
-      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
98
-
99
-    clearTimeout(self.timeout)
100
-
101
-    self.hoverState = 'in'
102
-
103
-    if (!self.options.delay || !self.options.delay.show) return self.show()
104
-
105
-    self.timeout = setTimeout(function () {
106
-      if (self.hoverState == 'in') self.show()
107
-    }, self.options.delay.show)
108
-  }
109
-
110
-  Tooltip.prototype.leave = function (obj) {
111
-    var self = obj instanceof this.constructor ?
112
-      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
113
-
114
-    clearTimeout(self.timeout)
115
-
116
-    self.hoverState = 'out'
117
-
118
-    if (!self.options.delay || !self.options.delay.hide) return self.hide()
119
-
120
-    self.timeout = setTimeout(function () {
121
-      if (self.hoverState == 'out') self.hide()
122
-    }, self.options.delay.hide)
123
-  }
124
-
125
-  Tooltip.prototype.show = function () {
126
-    var e = $.Event('show.bs.' + this.type)
127
-
128
-    if (this.hasContent() && this.enabled) {
129
-      this.$element.trigger(e)
130
-
131
-      if (e.isDefaultPrevented()) return
132
-      var that = this;
133
-
134
-      var $tip = this.tip()
135
-
136
-      this.setContent()
137
-
138
-      if (this.options.animation) $tip.addClass('fade')
139
-
140
-      var placement = typeof this.options.placement == 'function' ?
141
-        this.options.placement.call(this, $tip[0], this.$element[0]) :
142
-        this.options.placement
143
-
144
-      var autoToken = /\s?auto?\s?/i
145
-      var autoPlace = autoToken.test(placement)
146
-      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
147
-
148
-      $tip
149
-        .detach()
150
-        .css({ top: 0, left: 0, display: 'block' })
151
-        .addClass(placement)
152
-
153
-      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
154
-
155
-      var pos          = this.getPosition()
156
-      var actualWidth  = $tip[0].offsetWidth
157
-      var actualHeight = $tip[0].offsetHeight
158
-
159
-      if (autoPlace) {
160
-        var $parent = this.$element.parent()
161
-
162
-        var orgPlacement = placement
163
-        var docScroll    = document.documentElement.scrollTop || document.body.scrollTop
164
-        var parentWidth  = this.options.container == 'body' ? window.innerWidth  : $parent.outerWidth()
165
-        var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
166
-        var parentLeft   = this.options.container == 'body' ? 0 : $parent.offset().left
167
-
168
-        placement = placement == 'bottom' && pos.top   + pos.height  + actualHeight - docScroll > parentHeight  ? 'top'    :
169
-                    placement == 'top'    && pos.top   - docScroll   - actualHeight < 0                         ? 'bottom' :
170
-                    placement == 'right'  && pos.right + actualWidth > parentWidth                              ? 'left'   :
171
-                    placement == 'left'   && pos.left  - actualWidth < parentLeft                               ? 'right'  :
172
-                    placement
173
-
174
-        $tip
175
-          .removeClass(orgPlacement)
176
-          .addClass(placement)
177
-      }
178
-
179
-      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
180
-
181
-      this.applyPlacement(calculatedOffset, placement)
182
-      this.hoverState = null
183
-
184
-      var complete = function() {
185
-        that.$element.trigger('shown.bs.' + that.type)
186
-      }
187
-
188
-      var deltas = {
189
-          "bottom": $tip[0].getBoundingClientRect().bottom - window.innerHeight,
190
-          "right": $tip[0].getBoundingClientRect().right - window.innerWidth,
191
-          "left": -$tip[0].getBoundingClientRect().left,
192
-          "top": -$tip[0].getBoundingClientRect().top
193
-      };
194
-      for(var direction in deltas) {
195
-          if (deltas[direction] > 0) {
196
-              var delta = deltas[direction];
197
-              if(direction === "right" || direction === "bottom") {
198
-                  delta = -delta;
199
-              }
200
-              direction = direction === "top" || direction === "bottom" ? "top" : "left";
201
-              var currentPosition = parseInt($tip.css(direction), 10);
202
-              $tip.css(direction, currentPosition + delta);
203
-              if(direction === "left") {
204
-                  $tip.children(".arrow").css(direction, parseInt($tip.children(".arrow").css(direction), 10) - delta);
205
-              } else {
206
-                  $tip.children(".arrow").css(direction, 50 - $tip[0].getBoundingClientRect().height / delta + "%");
207
-              }
208
-          }
209
-      }
210
-
211
-      $.support.transition && this.$tip.hasClass('fade') ?
212
-        $tip
213
-          .one($.support.transition.end, complete)
214
-          .emulateTransitionEnd(150) :
215
-        complete()
216
-    }
217
-  }
218
-
219
-  Tooltip.prototype.applyPlacement = function (offset, placement) {
220
-    var replace
221
-    var $tip   = this.tip()
222
-    var width  = $tip[0].offsetWidth
223
-    var height = $tip[0].offsetHeight
224
-
225
-    // manually read margins because getBoundingClientRect includes difference
226
-    var marginTop = parseInt($tip.css('margin-top'), 10)
227
-    var marginLeft = parseInt($tip.css('margin-left'), 10)
228
-
229
-    // we must check for NaN for ie 8/9
230
-    if (isNaN(marginTop))  marginTop  = 0
231
-    if (isNaN(marginLeft)) marginLeft = 0
232
-
233
-    offset.top  = offset.top  + marginTop
234
-    offset.left = offset.left + marginLeft
235
-
236
-    // $.fn.offset doesn't round pixel values
237
-    // so we use setOffset directly with our own function B-0
238
-    $.offset.setOffset($tip[0], $.extend({
239
-      using: function (props) {
240
-        $tip.css({
241
-          top: Math.round(props.top),
242
-          left: Math.round(props.left)
243
-        })
244
-      }
245
-    }, offset), 0)
246
-
247
-    $tip.addClass('in')
248
-
249
-    // check to see if placing tip in new offset caused the tip to resize itself
250
-    var actualWidth  = $tip[0].offsetWidth
251
-    var actualHeight = $tip[0].offsetHeight
252
-
253
-    if (placement == 'top' && actualHeight != height) {
254
-      replace = true
255
-      offset.top = offset.top + height - actualHeight
256
-    }
257
-
258
-    if (/bottom|top/.test(placement)) {
259
-      var delta = 0
260
-
261
-      if (offset.left < 0) {
262
-        delta       = offset.left * -2
263
-        offset.left = 0
264
-
265
-        $tip.offset(offset)
266
-
267
-        actualWidth  = $tip[0].offsetWidth
268
-        actualHeight = $tip[0].offsetHeight
269
-      }
270
-
271
-      this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
272
-    } else {
273
-      this.replaceArrow(actualHeight - height, actualHeight, 'top')
274
-    }
275
-
276
-    if (replace) $tip.offset(offset)
277
-  }
278
-
279
-  Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
280
-    this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
281
-  }
282
-
283
-  Tooltip.prototype.setContent = function () {
284
-    var $tip  = this.tip()
285
-    var title = this.getTitle()
286
-
287
-    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
288
-    $tip.removeClass('fade in top bottom left right')
289
-  }
290
-
291
-  Tooltip.prototype.hide = function () {
292
-    var that = this
293
-    var $tip = this.tip()
294
-    var e    = $.Event('hide.bs.' + this.type)
295
-
296
-    function complete() {
297
-      if (that.hoverState != 'in') $tip.detach()
298
-      that.$element.trigger('hidden.bs.' + that.type)
299
-    }
300
-
301
-    this.$element.trigger(e)
302
-
303
-    if (e.isDefaultPrevented()) return
304
-
305
-    $tip.removeClass('in')
306
-
307
-    $.support.transition && this.$tip.hasClass('fade') ?
308
-      $tip
309
-        .one($.support.transition.end, complete)
310
-        .emulateTransitionEnd(150) :
311
-      complete()
312
-
313
-    this.hoverState = null
314
-
315
-    return this
316
-  }
317
-
318
-  Tooltip.prototype.fixTitle = function () {
319
-    var $e = this.$element
320
-    if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
321
-      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
322
-    }
323
-  }
324
-
325
-  Tooltip.prototype.hasContent = function () {
326
-    return this.getTitle()
327
-  }
328
-
329
-  Tooltip.prototype.getPosition = function () {
330
-    var el = this.$element[0]
331
-    return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
332
-      width: el.offsetWidth,
333
-      height: el.offsetHeight
334
-    }, this.$element.offset())
335
-  }
336
-
337
-  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
338
-    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
339
-           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
340
-           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
341
-        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }
342
-  }
343
-
344
-  Tooltip.prototype.getTitle = function () {
345
-    var title
346
-    var $e = this.$element
347
-    var o  = this.options
348
-
349
-    title = $e.attr('data-original-title')
350
-      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
351
-
352
-    return title
353
-  }
354
-
355
-  Tooltip.prototype.tip = function () {
356
-    return this.$tip = this.$tip || $(this.options.template)
357
-  }
358
-
359
-  Tooltip.prototype.arrow = function () {
360
-    return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
361
-  }
362
-
363
-  Tooltip.prototype.validate = function () {
364
-    if (!this.$element[0].parentNode) {
365
-      this.hide()
366
-      this.$element = null
367
-      this.options  = null
368
-    }
369
-  }
370
-
371
-  Tooltip.prototype.enable = function () {
372
-    this.enabled = true
373
-  }
374
-
375
-  Tooltip.prototype.disable = function () {
376
-    this.enabled = false
377
-  }
378
-
379
-  Tooltip.prototype.toggleEnabled = function () {
380
-    this.enabled = !this.enabled
381
-  }
382
-
383
-  Tooltip.prototype.toggle = function (e) {
384
-    var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
385
-    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
386
-  }
387
-
388
-  Tooltip.prototype.destroy = function () {
389
-    clearTimeout(this.timeout)
390
-    this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
391
-  }
392
-
393
-
394
-  // TOOLTIP PLUGIN DEFINITION
395
-  // =========================
396
-
397
-  var old = $.fn.tooltip
398
-
399
-  $.fn.tooltip = function (option) {
400
-    return this.each(function () {
401
-      var $this   = $(this)
402
-      var data    = $this.data('bs.tooltip')
403
-      var options = typeof option == 'object' && option
404
-
405
-      if (!data && option == 'destroy') return
406
-      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
407
-      if (typeof option == 'string') data[option]()
408
-    })
409
-  }
410
-
411
-  $.fn.tooltip.Constructor = Tooltip
412
-
413
-
414
-  // TOOLTIP NO CONFLICT
415
-  // ===================
416
-
417
-  $.fn.tooltip.noConflict = function () {
418
-    $.fn.tooltip = old
419
-    return this
420
-  }
421
-
422
-}(jQuery);

+ 0
- 2
libs/tooltip.min.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 1
libs/tooltip.min.map
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 2
- 4
modules/RTC/MediaStream.js Dosyayı Görüntüle

6
  *
6
  *
7
  * @param data the data object from which we obtain the stream,
7
  * @param data the data object from which we obtain the stream,
8
  * the peerjid, etc.
8
  * the peerjid, etc.
9
- * @param sid the session id
10
  * @param ssrc the ssrc corresponding to this MediaStream
9
  * @param ssrc the ssrc corresponding to this MediaStream
11
  * @param mute the whether this MediaStream is muted
10
  * @param mute the whether this MediaStream is muted
12
  *
11
  *
13
  * @constructor
12
  * @constructor
14
  */
13
  */
15
-function MediaStream(data, sid, ssrc, browser, eventEmitter, mute) {
14
+function MediaStream(data, ssrc, browser, eventEmitter, muted) {
16
 
15
 
17
     // XXX(gp) to minimize headaches in the future, we should build our
16
     // XXX(gp) to minimize headaches in the future, we should build our
18
     // abstractions around tracks and not streams. ORTC is track based API.
17
     // abstractions around tracks and not streams. ORTC is track based API.
24
     // Also, we should be able to associate multiple SSRCs with a MediaTrack as
23
     // Also, we should be able to associate multiple SSRCs with a MediaTrack as
25
     // a track might have an associated RTX and FEC sources.
24
     // a track might have an associated RTX and FEC sources.
26
 
25
 
27
-    this.sid = sid;
28
     this.stream = data.stream;
26
     this.stream = data.stream;
29
     this.peerjid = data.peerjid;
27
     this.peerjid = data.peerjid;
30
     this.videoType = data.videoType;
28
     this.videoType = data.videoType;
31
     this.ssrc = ssrc;
29
     this.ssrc = ssrc;
32
     this.type = (this.stream.getVideoTracks().length > 0)?
30
     this.type = (this.stream.getVideoTracks().length > 0)?
33
         MediaStreamType.VIDEO_TYPE : MediaStreamType.AUDIO_TYPE;
31
         MediaStreamType.VIDEO_TYPE : MediaStreamType.AUDIO_TYPE;
34
-    this.muted = mute;
32
+    this.muted = muted;
35
     this.eventEmitter = eventEmitter;
33
     this.eventEmitter = eventEmitter;
36
 }
34
 }
37
 
35
 

+ 2
- 2
modules/RTC/RTC.js Dosyayı Görüntüle

101
             }
101
             }
102
         }
102
         }
103
     },
103
     },
104
-    createRemoteStream: function (data, sid, thessrc) {
104
+    createRemoteStream: function (data, ssrc) {
105
         var jid = data.peerjid || APP.xmpp.myJid();
105
         var jid = data.peerjid || APP.xmpp.myJid();
106
 
106
 
107
         // check the video muted state from last stored presence if any
107
         // check the video muted state from last stored presence if any
111
             muted = pres.videoMuted;
111
             muted = pres.videoMuted;
112
         }
112
         }
113
 
113
 
114
-        var remoteStream = new MediaStream(data, sid, thessrc,
114
+        var remoteStream = new MediaStream(data, ssrc,
115
             RTCBrowserType.getBrowserType(), eventEmitter, muted);
115
             RTCBrowserType.getBrowserType(), eventEmitter, muted);
116
 
116
 
117
         if(!this.remoteStreams[jid]) {
117
         if(!this.remoteStreams[jid]) {

+ 1
- 2
modules/RTC/RTCUtils.js Dosyayı Görüntüle

259
                 attachMediaStream(elSel[0], stream);
259
                 attachMediaStream(elSel[0], stream);
260
             };
260
             };
261
             self.getStreamID = function (stream) {
261
             self.getStreamID = function (stream) {
262
-                var id = APP.xmpp.filter_special_chars(stream.label);
263
-                return id;
262
+                return APP.xmpp.filter_special_chars(stream.label);
264
             };
263
             };
265
             self.getVideoSrc = function (element) {
264
             self.getVideoSrc = function (element) {
266
                 if (!element) {
265
                 if (!element) {

+ 2
- 2
modules/UI/toolbars/Toolbar.js Dosyayı Görüntüle

129
     'invite': '#toolbar_button_link',
129
     'invite': '#toolbar_button_link',
130
     'chat': '#toolbar_button_chat',
130
     'chat': '#toolbar_button_chat',
131
     'prezi': '#toolbar_button_prezi',
131
     'prezi': '#toolbar_button_prezi',
132
-    'ethherpad': '#toolbar_button_etherpad',
132
+    'etherpad': '#toolbar_button_etherpad',
133
     'fullscreen': '#toolbar_button_fullScreen',
133
     'fullscreen': '#toolbar_button_fullScreen',
134
     'settings': '#toolbar_button_settings',
134
     'settings': '#toolbar_button_settings',
135
     'hangup': '#toolbar_button_hangup'
135
     'hangup': '#toolbar_button_hangup'
720
     return my;
720
     return my;
721
 }(Toolbar || {}));
721
 }(Toolbar || {}));
722
 
722
 
723
-module.exports = Toolbar;
723
+module.exports = Toolbar;

+ 5
- 15
modules/UI/videolayout/RemoteVideo.js Dosyayı Görüntüle

168
 RemoteVideo.prototype.remove = function () {
168
 RemoteVideo.prototype.remove = function () {
169
     console.log("Remove thumbnail", this.peerJid);
169
     console.log("Remove thumbnail", this.peerJid);
170
     this.removeConnectionIndicator();
170
     this.removeConnectionIndicator();
171
+    // Make sure that the large video is updated if are removing its
172
+    // corresponding small video.
173
+    this.VideoLayout.updateRemovedVideo(this.getResourceJid());
171
     // Remove whole container
174
     // Remove whole container
172
     if (this.container.parentNode)
175
     if (this.container.parentNode)
173
         this.container.parentNode.removeChild(this.container);
176
         this.container.parentNode.removeChild(this.container);
204
     sel[0].onplaying = onPlayingHandler;
207
     sel[0].onplaying = onPlayingHandler;
205
 };
208
 };
206
 
209
 
207
-RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {
210
+RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
208
     if (!this.container)
211
     if (!this.container)
209
         return;
212
         return;
210
 
213
 
211
     var self = this;
214
     var self = this;
212
     var isVideo = stream.getVideoTracks().length > 0;
215
     var isVideo = stream.getVideoTracks().length > 0;
213
-    var streamElement = SmallVideo.createStreamElement(sid, stream);
216
+    var streamElement = SmallVideo.createStreamElement(stream);
214
     var newElementId = streamElement.id;
217
     var newElementId = streamElement.id;
215
 
218
 
216
     // Put new stream element always in front
219
     // Put new stream element always in front
233
 
236
 
234
     };
237
     };
235
 
238
 
236
-    /**
237
-     * FF is missing onended event for remote streams. The problem we are fixing
238
-     * here is when the last participant leaves the room the video element is
239
-     * not updated. So the avatar or last video frame will stay, the fix updates
240
-     * the video elem and switches to local video the same as behavior in other
241
-     * browsers.
242
-     */
243
-    if (RTCBrowserType.isFirefox()) {
244
-        APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) {
245
-            self.removeRemoteStreamElement(stream, isVideo, newElementId);
246
-        });
247
-    }
248
-
249
     // Add click handler.
239
     // Add click handler.
250
     var onClickHandler = function (event) {
240
     var onClickHandler = function (event) {
251
 
241
 

+ 6
- 5
modules/UI/videolayout/SmallVideo.js Dosyayı Görüntüle

102
 };
102
 };
103
 
103
 
104
 /**
104
 /**
105
- * Creates an audio or video stream element.
105
+ * Creates an audio or video element for a particular MediaStream.
106
  */
106
  */
107
-SmallVideo.createStreamElement = function (sid, stream) {
107
+SmallVideo.createStreamElement = function (stream) {
108
     var isVideo = stream.getVideoTracks().length > 0;
108
     var isVideo = stream.getVideoTracks().length > 0;
109
 
109
 
110
     var element = isVideo ? document.createElement('video')
110
     var element = isVideo ? document.createElement('video')
111
         : document.createElement('audio');
111
         : document.createElement('audio');
112
-    var id = (isVideo ? 'remoteVideo_' : 'remoteAudio_') + sid + '_' +
113
-        APP.RTC.getStreamID(stream);
114
 
112
 
115
-    element.id = id;
116
     if (!RTCBrowserType.isIExplorer()) {
113
     if (!RTCBrowserType.isIExplorer()) {
117
         element.autoplay = true;
114
         element.autoplay = true;
118
     }
115
     }
116
+
117
+    element.id = (isVideo ? 'remoteVideo_' : 'remoteAudio_') +
118
+        APP.RTC.getStreamID(stream);
119
+
119
     element.oncontextmenu = function () { return false; };
120
     element.oncontextmenu = function () { return false; };
120
 
121
 
121
     return element;
122
     return element;

+ 24
- 14
modules/UI/videolayout/VideoLayout.js Dosyayı Görüntüle

126
     /**
126
     /**
127
      * Checks if removed video is currently displayed and tries to display
127
      * Checks if removed video is currently displayed and tries to display
128
      * another one instead.
128
      * another one instead.
129
-     * @param removedVideoSrc src stream identifier of the video.
130
      */
129
      */
131
     my.updateRemovedVideo = function(resourceJid) {
130
     my.updateRemovedVideo = function(resourceJid) {
131
+        var newResourceJid;
132
 
132
 
133
         if (resourceJid === LargeVideo.getResourceJid()) {
133
         if (resourceJid === LargeVideo.getResourceJid()) {
134
-            var newResourceJid;
135
             // We'll show user's avatar if he is the dominant speaker or if
134
             // We'll show user's avatar if he is the dominant speaker or if
136
             // his video thumbnail is pinned
135
             // his video thumbnail is pinned
137
             if (remoteVideos[resourceJid] &&
136
             if (remoteVideos[resourceJid] &&
153
         var pick = $('#remoteVideos>span[id!="mixedstream"]:visible:last');
152
         var pick = $('#remoteVideos>span[id!="mixedstream"]:visible:last');
154
         if (pick.length) {
153
         if (pick.length) {
155
             jid = VideoLayout.getPeerContainerResourceJid(pick[0]);
154
             jid = VideoLayout.getPeerContainerResourceJid(pick[0]);
156
-        } else {
155
+            if (!remoteVideos[jid]) {
156
+                // The RemoteVideo was removed (but the DOM elements may still
157
+                // exist).
158
+                jid = null;
159
+            }
160
+        }
161
+
162
+        if (!jid) {
157
             console.info("Last visible video no longer exists");
163
             console.info("Last visible video no longer exists");
158
             pick = $('#remoteVideos>span[id!="mixedstream"]');
164
             pick = $('#remoteVideos>span[id!="mixedstream"]');
159
             if (pick.length) {
165
             if (pick.length) {
160
                 jid = VideoLayout.getPeerContainerResourceJid(pick[0]);
166
                 jid = VideoLayout.getPeerContainerResourceJid(pick[0]);
161
-            }
162
-            if (!jid) {
163
-                // Go with local video
164
-                console.info("Fallback to local video...");
165
-                jid = APP.xmpp.myResource();
167
+                if (!remoteVideos[jid]) {
168
+                    // The RemoteVideo was removed (but the DOM elements may
169
+                    // still exist).
170
+                    jid = null;
171
+                }
166
             }
172
             }
167
         }
173
         }
174
+
175
+        if (!jid) {
176
+            // Go with local video
177
+            console.info("Fallback to local video...");
178
+            jid = APP.xmpp.myResource();
179
+        }
180
+
168
         console.info("electLastVisibleVideo: " + jid);
181
         console.info("electLastVisibleVideo: " + jid);
169
         return jid;
182
         return jid;
170
     };
183
     };
175
 
188
 
176
             var resourceJid = Strophe.getResourceFromJid(stream.peerjid);
189
             var resourceJid = Strophe.getResourceFromJid(stream.peerjid);
177
             remoteVideos[resourceJid].addRemoteStreamElement(
190
             remoteVideos[resourceJid].addRemoteStreamElement(
178
-                stream.sid,
179
-                stream.getOriginalStream(),
180
-                stream.ssrc);
191
+                stream.getOriginalStream());
181
         }
192
         }
182
     };
193
     };
183
 
194
 
832
             focusedVideoResourceJid = null;
843
             focusedVideoResourceJid = null;
833
         }
844
         }
834
 
845
 
835
-        if (currentDominantSpeaker === resourceJid)
836
-        {
846
+        if (currentDominantSpeaker === resourceJid) {
837
             console.info("Dominant speaker has left the conference");
847
             console.info("Dominant speaker has left the conference");
838
             currentDominantSpeaker = null;
848
             currentDominantSpeaker = null;
839
         }
849
         }
842
         if (remoteVideo) {
852
         if (remoteVideo) {
843
             // Remove remote video
853
             // Remove remote video
844
             console.info("Removing remote video: " + resourceJid);
854
             console.info("Removing remote video: " + resourceJid);
845
-            remoteVideo.remove();
846
             delete remoteVideos[resourceJid];
855
             delete remoteVideos[resourceJid];
856
+            remoteVideo.remove();
847
         } else {
857
         } else {
848
             console.warn("No remote video for " + resourceJid);
858
             console.warn("No remote video for " + resourceJid);
849
         }
859
         }

+ 2
- 1
modules/desktopsharing/desktopsharing.js Dosyayı Görüntüle

135
                     isUsingScreenStream = false;
135
                     isUsingScreenStream = false;
136
                     newStreamCreated(stream);
136
                     newStreamCreated(stream);
137
                 },
137
                 },
138
-                getVideoStreamFailed, config.resolution || '360'
138
+                getVideoStreamFailed,
139
+                config.resolution || '360'
139
             );
140
             );
140
         }
141
         }
141
     },
142
     },

+ 17
- 0
modules/settings/Settings.js Dosyayı Görüntüle

36
 }
36
 }
37
 
37
 
38
 var Settings = {
38
 var Settings = {
39
+
40
+    /**
41
+     * Sets the local user display name and saves it to local storage
42
+     *
43
+     * @param newDisplayName the new display name for the local user
44
+     * @returns {string} the display name we just set
45
+     */
39
     setDisplayName: function (newDisplayName) {
46
     setDisplayName: function (newDisplayName) {
40
         displayName = newDisplayName;
47
         displayName = newDisplayName;
41
         window.localStorage.displayname = displayName;
48
         window.localStorage.displayname = displayName;
42
         return displayName;
49
         return displayName;
43
     },
50
     },
51
+
52
+    /**
53
+     * Returns the currently used by the user
54
+     * @returns {string} currently valid user display name.
55
+     */
56
+    getDisplayName: function () {
57
+        return displayName;
58
+    },
59
+
44
     setEmail: function (newEmail) {
60
     setEmail: function (newEmail) {
45
         email = newEmail;
61
         email = newEmail;
46
         window.localStorage.email = newEmail;
62
         window.localStorage.email = newEmail;
47
         return email;
63
         return email;
48
     },
64
     },
65
+
49
     getSettings: function () {
66
     getSettings: function () {
50
         return {
67
         return {
51
             email: email,
68
             email: email,

+ 6
- 0
modules/statistics/CallStats.js Dosyayı Görüntüle

1
 /* global config, $, APP, Strophe, callstats */
1
 /* global config, $, APP, Strophe, callstats */
2
+
3
+var Settings = require('../settings/Settings');
2
 var jsSHA = require('jssha');
4
 var jsSHA = require('jssha');
3
 var io = require('socket.io-client');
5
 var io = require('socket.io-client');
4
 var callStats = null;
6
 var callStats = null;
20
 
22
 
21
         this.userID =  APP.xmpp.myResource();
23
         this.userID =  APP.xmpp.myResource();
22
 
24
 
25
+        //use whatever the user said to facilitate debugging
26
+        if(Settings.getDisplayName())
27
+            this.userID = Settings.getDisplayName();
28
+
23
         var location = window.location;
29
         var location = window.location;
24
         this.confID = location.hostname + location.pathname;
30
         this.confID = location.hostname + location.pathname;
25
 
31
 

+ 42
- 40
modules/xmpp/JingleSessionPC.js Dosyayı Görüntüle

108
         self.sendIceCandidate(event.candidate);
108
         self.sendIceCandidate(event.candidate);
109
     };
109
     };
110
     this.peerconnection.onaddstream = function (event) {
110
     this.peerconnection.onaddstream = function (event) {
111
-        if (event.stream.id !== 'default') {
112
-        console.log("REMOTE STREAM ADDED: ", event.stream , event.stream.id);
113
-        self.remoteStreamAdded(event);
114
-        } else {
111
+        if (event.stream.id === 'default') {
115
             // This is a recvonly stream. Clients that implement Unified Plan,
112
             // This is a recvonly stream. Clients that implement Unified Plan,
116
             // such as Firefox use recvonly "streams/channels/tracks" for
113
             // such as Firefox use recvonly "streams/channels/tracks" for
117
             // receiving remote stream/tracks, as opposed to Plan B where there
114
             // receiving remote stream/tracks, as opposed to Plan B where there
118
             // are only 3 channels: audio, video and data.
115
             // are only 3 channels: audio, video and data.
119
-            console.log("RECVONLY REMOTE STREAM IGNORED: " + event.stream + " - " + event.stream.id);
116
+            console.log("RECVONLY REMOTE STREAM IGNORED: " + event.stream +
117
+            " - " + event.stream.id);
118
+            return;
120
         }
119
         }
120
+
121
+        console.log("REMOTE STREAM ADDED: ", event.stream, event.stream.id);
122
+        self.remoteStreamAdded(event);
121
     };
123
     };
122
     this.peerconnection.onremovestream = function (event) {
124
     this.peerconnection.onremovestream = function (event) {
123
-        // Remove the stream from remoteStreams
124
-        // FIXME: remotestreamremoved.jingle not defined anywhere(unused)
125
-        $(document).trigger('remotestreamremoved.jingle', [event, self.sid]);
125
+        // Remove the stream from remoteStreams?
126
+        console.log("We are ignoring a removestream event: " + event);
126
     };
127
     };
127
     this.peerconnection.onsignalingstatechange = function (event) {
128
     this.peerconnection.onsignalingstatechange = function (event) {
128
         if (!(self && self.peerconnection)) return;
129
         if (!(self && self.peerconnection)) return;
857
     }
858
     }
858
 };
859
 };
859
 
860
 
860
-JingleSessionPC.prototype.addSource = function (elem, fromJid) {
861
+/**
862
+ * Handles a Jingle source-add message for this Jingle session.
863
+ * @param elem An array of Jingle "content" elements.
864
+ */
865
+JingleSessionPC.prototype.addSource = function (elem) {
861
 
866
 
862
     var self = this;
867
     var self = this;
863
     // FIXME: dirty waiting
868
     // FIXME: dirty waiting
865
         console.warn("addSource - localDescription not ready yet");
870
         console.warn("addSource - localDescription not ready yet");
866
         setTimeout(function()
871
         setTimeout(function()
867
             {
872
             {
868
-                self.addSource(elem, fromJid);
873
+                self.addSource(elem);
869
             },
874
             },
870
             200
875
             200
871
         );
876
         );
938
     });
943
     });
939
 };
944
 };
940
 
945
 
941
-JingleSessionPC.prototype.removeSource = function (elem, fromJid) {
946
+/**
947
+ * Handles a Jingle source-remove message for this Jingle session.
948
+ * @param elem An array of Jingle "content" elements.
949
+ */
950
+JingleSessionPC.prototype.removeSource = function (elem) {
942
 
951
 
943
     var self = this;
952
     var self = this;
944
     // FIXME: dirty waiting
953
     // FIXME: dirty waiting
945
     if (!this.peerconnection.localDescription) {
954
     if (!this.peerconnection.localDescription) {
946
         console.warn("removeSource - localDescription not ready yet");
955
         console.warn("removeSource - localDescription not ready yet");
947
         setTimeout(function() {
956
         setTimeout(function() {
948
-                self.removeSource(elem, fromJid);
957
+                self.removeSource(elem);
949
             },
958
             },
950
             200
959
             200
951
         );
960
         );
1440
     );
1449
     );
1441
 }
1450
 }
1442
 
1451
 
1443
-
1444
-JingleSessionPC.prototype.remoteStreamAdded = function (data, times) {
1452
+/**
1453
+ * Handles 'onaddstream' events from the RTCPeerConnection.
1454
+ * @param event the 'onaddstream' event.
1455
+ */
1456
+JingleSessionPC.prototype.remoteStreamAdded = function (event) {
1445
     var self = this;
1457
     var self = this;
1446
-    var thessrc;
1447
-    var streamId = APP.RTC.getStreamID(data.stream);
1458
+    var ssrc;
1459
+    var ssrclines;
1460
+    var streamId = APP.RTC.getStreamID(event.stream);
1448
 
1461
 
1449
     // look up an associated JID for a stream id
1462
     // look up an associated JID for a stream id
1450
     if (!streamId) {
1463
     if (!streamId) {
1451
-        console.error("No stream ID for", data.stream);
1452
-    } else if (streamId && streamId.indexOf('mixedmslabel') === -1) {
1464
+        console.error("No stream ID for", event.stream);
1465
+    } else if (streamId.indexOf('mixedmslabel') === -1) {
1453
         // look only at a=ssrc: and _not_ at a=ssrc-group: lines
1466
         // look only at a=ssrc: and _not_ at a=ssrc-group: lines
1454
 
1467
 
1455
-        var ssrclines
1456
-            = SDPUtil.find_lines(this.peerconnection.remoteDescription.sdp, 'a=ssrc:');
1468
+        ssrclines = SDPUtil.find_lines(
1469
+            this.peerconnection.remoteDescription.sdp,
1470
+            'a=ssrc:');
1457
         ssrclines = ssrclines.filter(function (line) {
1471
         ssrclines = ssrclines.filter(function (line) {
1458
             // NOTE(gp) previously we filtered on the mslabel, but that property
1472
             // NOTE(gp) previously we filtered on the mslabel, but that property
1459
             // is not always present.
1473
             // is not always present.
1460
-            // return line.indexOf('mslabel:' + data.stream.label) !== -1;
1474
+            // return line.indexOf('mslabel:' + event.stream.label) !== -1;
1461
 
1475
 
1462
             if (RTCBrowserType.isTemasysPluginUsed()) {
1476
             if (RTCBrowserType.isTemasysPluginUsed()) {
1463
                 return ((line.indexOf('mslabel:' + streamId) !== -1));
1477
                 return ((line.indexOf('mslabel:' + streamId) !== -1));
1466
             }
1480
             }
1467
         });
1481
         });
1468
         if (ssrclines.length) {
1482
         if (ssrclines.length) {
1469
-            thessrc = ssrclines[0].substring(7).split(' ')[0];
1483
+            ssrc = ssrclines[0].substring(7).split(' ')[0];
1470
 
1484
 
1471
-            if (!self.ssrcOwners[thessrc]) {
1472
-                console.error("No SSRC owner known for: " + thessrc);
1485
+            if (!self.ssrcOwners[ssrc]) {
1486
+                console.error("No SSRC owner known for: " + ssrc);
1473
                 return;
1487
                 return;
1474
             }
1488
             }
1475
-            data.peerjid = self.ssrcOwners[thessrc];
1476
-            console.log('associated jid', self.ssrcOwners[thessrc]);
1489
+            event.peerjid = self.ssrcOwners[ssrc];
1490
+            console.log('Adding remote stream, SSRC ' + ssrc +
1491
+                ', associated jid ' + event.peerjid);
1477
         } else {
1492
         } else {
1478
             console.error("No SSRC lines for ", streamId);
1493
             console.error("No SSRC lines for ", streamId);
1479
         }
1494
         }
1480
     }
1495
     }
1481
 
1496
 
1482
-    APP.RTC.createRemoteStream(data, this.sid, thessrc);
1483
-
1484
-    var isVideo = data.stream.getVideoTracks().length > 0;
1485
-    // an attempt to work around https://github.com/jitsi/jitmeet/issues/32
1486
-    // TODO: is this hack still needed now that we announce an SSRC for
1487
-    // receive-only streams?
1488
-    if (isVideo &&
1489
-        data.peerjid && this.peerjid === data.peerjid &&
1490
-        data.stream.getVideoTracks().length === 0 &&
1491
-        APP.RTC.localVideo.getTracks().length > 0) {
1492
-        window.setTimeout(function () {
1493
-            sendKeyframe(self.peerconnection);
1494
-        }, 3000);
1495
-    }
1497
+    APP.RTC.createRemoteStream(event, ssrc);
1496
 };
1498
 };
1497
 
1499
 
1498
 module.exports = JingleSessionPC;
1500
 module.exports = JingleSessionPC;

+ 2
- 2
modules/xmpp/strophe.jingle.js Dosyayı Görüntüle

174
                     break;
174
                     break;
175
                 case 'addsource': // FIXME: proprietary, un-jingleish
175
                 case 'addsource': // FIXME: proprietary, un-jingleish
176
                 case 'source-add': // FIXME: proprietary
176
                 case 'source-add': // FIXME: proprietary
177
-                    sess.addSource($(iq).find('>jingle>content'), fromJid);
177
+                    sess.addSource($(iq).find('>jingle>content'));
178
                     break;
178
                     break;
179
                 case 'removesource': // FIXME: proprietary, un-jingleish
179
                 case 'removesource': // FIXME: proprietary, un-jingleish
180
                 case 'source-remove': // FIXME: proprietary
180
                 case 'source-remove': // FIXME: proprietary
181
-                    sess.removeSource($(iq).find('>jingle>content'), fromJid);
181
+                    sess.removeSource($(iq).find('>jingle>content'));
182
                     break;
182
                     break;
183
                 default:
183
                 default:
184
                     console.warn('jingle action not implemented', action);
184
                     console.warn('jingle action not implemented', action);

+ 74
- 17
package.json Dosyayı Görüntüle

16
   "readmeFilename": "README.md",
16
   "readmeFilename": "README.md",
17
   "//": "Callstats.io does not work with recent versions of jsSHA (2.0.1 in particular)",
17
   "//": "Callstats.io does not work with recent versions of jsSHA (2.0.1 in particular)",
18
   "dependencies": {
18
   "dependencies": {
19
-      "events": "*",
20
-      "pako": "*",
21
-      "i18next-client": "1.7.7",
22
-      "sdp-interop": "0.1.10",
23
-      "sdp-transform": "1.4.1",
24
-      "sdp-simulcast": "0.1.0",
25
-      "async": "0.9.0",
26
-      "retry": "0.6.1",
27
-      "jssha": "1.5.0",
28
-      "socket.io-client": "1.3.6"
19
+    "async": "0.9.0",
20
+    "autosize": "^1.18.13",
21
+    "bootstrap": "^3.1.1",
22
+    "events": "*",
23
+    "i18next-client": "1.7.7",
24
+    "jquery": "^2.1.1",
25
+    "jQuery-Impromptu": "git+https://github.com/trentrichardson/jQuery-Impromptu.git#v6.0.0",
26
+    "jquery-ui": "^1.10.5",
27
+    "jssha": "1.5.0",
28
+    "pako": "*",
29
+    "retry": "0.6.1",
30
+    "sdp-interop": "0.1.10",
31
+    "sdp-simulcast": "0.1.0",
32
+    "sdp-transform": "1.4.1",
33
+    "socket.io-client": "1.3.6",
34
+    "strophe": "^1.2.2",
35
+    "strophejs-plugins": "^0.0.6",
36
+    "toastr": "^2.0.3"
29
   },
37
   },
30
   "devDependencies": {
38
   "devDependencies": {
31
-      "precommit-hook": "3.0.0",
32
-      "jshint": "2.8.0",
33
-      "uglify-js": "2.4.24",
34
-      "browserify": "11.1.x",
35
-      "exorcist": "*"
39
+    "browserify": "11.1.x",
40
+    "browserify-shim": "^3.8.10",
41
+    "exorcist": "*",
42
+    "jshint": "2.8.0",
43
+    "precommit-hook": "3.0.0",
44
+    "uglify-js": "2.4.24"
36
   },
45
   },
37
   "license": "Apache-2.0",
46
   "license": "Apache-2.0",
38
   "scripts": {
47
   "scripts": {
39
-    "lint": "./node_modules/.bin/jshint ."
48
+    "lint": "./node_modules/.bin/jshint .",
49
+    "validate": "npm ls"
40
   },
50
   },
41
-  "pre-commit": ["lint"]
51
+  "pre-commit": [
52
+    "lint"
53
+  ],
54
+  "browserify": {
55
+    "transform": [
56
+      "browserify-shim"
57
+    ]
58
+  },
59
+  "browser": {
60
+    "jquery": "./node_modules/jquery/dist/jquery.js",
61
+    "jquery-ui": "./node_modules/jquery-ui/jquery-ui.js",
62
+    "strophe": "./node_modules/strophe/strophe.js",
63
+    "strophe-disco": "./node_modules/strophejs-plugins/disco/strophe.disco.js",
64
+    "strophe-caps": "./node_modules/strophejs-plugins/caps/strophe.caps.jsonly.js",
65
+    "toastr": "./node_modules/toastr/toastr.js",
66
+    "tooltip": "./node_modules/bootstrap/js/tooltip.js",
67
+    "popover": "./node_modules/bootstrap/js/popover.js",
68
+    "jQuery-Impromptu": "./node_modules/jQuery-Impromptu/dist/jquery-impromptu.js",
69
+    "autosize": "./node_modules/autosize/build/jquery.autosize.js"
70
+  },
71
+  "browserify-shim": {
72
+    "jquery": [
73
+      "$"
74
+    ],
75
+    "strophe": {
76
+      "exports": "Strophe",
77
+      "depends": [
78
+        "jquery:$"
79
+      ]
80
+    },
81
+    "strophe-disco": {
82
+      "depends": [
83
+        "strophe:Strophe"
84
+      ]
85
+    },
86
+    "tooltip": {
87
+      "depends": "jquery:jQuery"
88
+    },
89
+    "popover": {
90
+      "depends": "jquery:jQuery"
91
+    },
92
+    "jQuery-Impromptu": {
93
+      "depends": "jquery:jQuery"
94
+    },
95
+    "autosize": {
96
+      "depends": "jquery:jQuery"
97
+    }
98
+  }
42
 }
99
 }

Loading…
İptal
Kaydet