Browse Source

Update jquery-injectcss to c85cea05d.

pull/109/head
Evan Theurer 11 years ago
parent
commit
200372adbf
  1. 2
      static/js/directives/audiovideo.js
  2. 14
      static/js/libs/jquery/jquery.injectCSS.js
  3. 8
      static/js/services/videolayout.js

2
static/js/directives/audiovideo.js

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/audiovideopeer.html', 'bigscreen', 'injectCSS', 'webrtc.adapter'], function($, _, template, templatePeer, BigScreen) {
define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/audiovideopeer.html', 'bigscreen', 'webrtc.adapter'], function($, _, template, templatePeer, BigScreen) {
return ["$window", "$compile", "$filter", "mediaStream", "safeApply", "desktopNotify", "buddyData", "videoWaiter", "videoLayout", "animationFrame", function($window, $compile, $filter, mediaStream, safeApply, desktopNotify, buddyData, videoWaiter, videoLayout, animationFrame) {

14
static/js/libs/jquery/jquery.injectCSS.js

@ -13,11 +13,11 @@ @@ -13,11 +13,11 @@
* Date: 2013-01-08
* Version: 0.1
*/
// https://raw.githubusercontent.com/kajic/jquery-injectCSS/c85cea05dc10a893daa676c1ecaded34a4c59280/jquery.injectCSS.js
(function (jQuery) {
'use strict';
function toCSS(jss) {
function toCSS(jss, options) {
function jsonToCSS(scope, css) {
if (scope && !result[scope]) {
result[scope] = {};
@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
function addProperty(scope, property, value) {
if (typeof(value) === "number") {
if (typeof(value) === "number" && !options.useRawValues) {
value = value + "px";
}
@ -141,7 +141,9 @@ @@ -141,7 +141,9 @@
var defaults = {
truncateFirst: false,
containerName: "injectCSSContainer"
container: null,
containerName: "injectCSSContainer",
useRawValues: false
};
jQuery.injectCSS = function (jss, options) {
@ -149,7 +151,7 @@ @@ -149,7 +151,7 @@
options.media = options.media || 'all';
var container = jQuery("#" + options.containerName);
var container = (options.container && jQuery(options.container)) || jQuery("#" + options.containerName);
if (!container.length) {
container = jQuery("<style></style>").appendTo('head').attr({
media: options.media,
@ -162,7 +164,7 @@ @@ -162,7 +164,7 @@
if (!options.truncateFirst) {
css += container.text();
}
css += toCSS(jss);
css += toCSS(jss, options);
var containerDomElem = container[0];
if (containerDomElem.styleSheet !== undefined && containerDomElem.styleSheet.cssText !== undefined) { // IE

8
static/js/services/videolayout.js

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) {
define(["jquery", "underscore", "modernizr", "injectCSS"], function($, _, Modernizr) {
var dynamicCSSContainer = "audiovideo-dynamic";
var renderers = {};
@ -149,7 +149,8 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) { @@ -149,7 +149,8 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) {
}
$.injectCSS(extraCSS, {
truncateFirst: true,
containerName: dynamicCSSContainer
containerName: dynamicCSSContainer,
useRawValues: true
});
};
@ -250,7 +251,8 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) { @@ -250,7 +251,8 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) {
$.injectCSS(extraCSS, {
truncateFirst: true,
containerName: dynamicCSSContainer
containerName: dynamicCSSContainer,
useRawValues: true
});
};

Loading…
Cancel
Save