yui

django-pipeline not compressing

99封情书 提交于 2019-12-23 19:50:58
问题 I have just installed django-pipeline into my django application and it doesn't seem to be compressing my javascript files. It seems to be installed properly as the template tags are working correctly. I'm using manage.py collectstatic in order to compress the files. Here is my current configuration. I have also set up my app to use django-staticfiles per the django-pipeline docs as I'm using Django 1.3. STATIC_ROOT = os.path.join(PROJECT_ROOT, 'site_media', 'static') STATIC_URL = '/site

Compressing multiple JavaScript files with YUIcompressor?

浪尽此生 提交于 2019-12-23 09:46:26
问题 I'm trying to compress multiple JS files using the YUI Compressor. I think that I'm getting the syntax wrong. I want to compress all files in a directory that start with at_ . However, when YUI Compressor runs, I find that YUI Compressor has placed only the compressed version of one file in the output. To be specific, suppose I have three files: at_1.js, at_2.js, and at_3.js. I would like the compressed output of all three js files in at_min.js I'm using the following syntax: java -jar c:

Missing name after . operator YUI Compressor for socket.io js files

你。 提交于 2019-12-23 06:56:56
问题 I am trying to use YUI compressor for socket.io based .js file (yes, I know it's server side script and doesn't require minfication, but it's requirement so I have a less control). My code is like this: fs.readFile('../examples/example.xml', function(err, data) { if (err) throw err; // parsing the new xml data and converting them into json file var json = parser.toJson(data); // adding the time of the last update json.time = new Date(); // send the new data to the client socket.volatile.emit(

JQuery and YUI, can they live together?

狂风中的少年 提交于 2019-12-23 06:50:35
问题 Can JQuery and YUI live together w/o any conflicts? 回答1: Yes. They live in different namespaces, plus jQuery has a noConflict option. 回答2: Yes YUI3 uses YUI object, jQuery uses $. For instance you can use YUI 3 Test module and inside it using $ for DOM manipulation/traversing (I think jQuery is really good for those purposes), so for instance you can do: YUI().use("test", function(){ test : function() { $('div li').addClass("example"); Y.Assert.areEqual("example", $('div li').attr("class"));

How to insert custom html tag using YUI Editor

不羁岁月 提交于 2019-12-23 04:12:08
问题 I've got YUI set up and working. I've created a custom button and it shows up fine. What I would like that button to do is wrap selected text with my own custom 'span' tags, just like clicking the 'bold' button wraps selected text with 'strong' / 'bold' tags. Does anyone have any examples they could point to to make this work? 回答1: Discovered the solution for myself, so I'm posting so others may see as well. :) First, a BIG thanks to MK_Dev for inspiration from his similar question asked back

How to insert custom html tag using YUI Editor

送分小仙女□ 提交于 2019-12-23 04:11:20
问题 I've got YUI set up and working. I've created a custom button and it shows up fine. What I would like that button to do is wrap selected text with my own custom 'span' tags, just like clicking the 'bold' button wraps selected text with 'strong' / 'bold' tags. Does anyone have any examples they could point to to make this work? 回答1: Discovered the solution for myself, so I'm posting so others may see as well. :) First, a BIG thanks to MK_Dev for inspiration from his similar question asked back

How to insert custom html tag using YUI Editor

时间秒杀一切 提交于 2019-12-23 04:11:11
问题 I've got YUI set up and working. I've created a custom button and it shows up fine. What I would like that button to do is wrap selected text with my own custom 'span' tags, just like clicking the 'bold' button wraps selected text with 'strong' / 'bold' tags. Does anyone have any examples they could point to to make this work? 回答1: Discovered the solution for myself, so I'm posting so others may see as well. :) First, a BIG thanks to MK_Dev for inspiration from his similar question asked back

Load jQuery and plugins in YUI

你说的曾经没有我的故事 提交于 2019-12-23 03:08:21
问题 I am trying to load jQuery as a YUI module, without adding it to the global scope. The best I came up with, was to create a global module.exports so that jQuery thinks it is in a common js pattern, and does not create a global jQuery object... // must create global object for jQuery to detect and attach to // otherwise it will create itself in the global scope module = { exports: {} }; YUI({ modules: { 'my-jquery': { fullpath: '//cdnjs.cloudflare.com/ajax/libs/jquery/1.10.1/jquery.min.js',

YUI Rich Editor + invalidHTML + style

两盒软妹~` 提交于 2019-12-23 01:40:11
问题 I am trying to insert an inline style tag into the editor content. When I call saveHTML it strips out the style block when I'm in rich editor view. I have tried changing the style property of invalidHTML to false, but it still seems to strip the style block out. Any pointers to the API or suggestions would be helpful at this stage! Thanks, Col. 回答1: I hope I understand your question properly. You just want to be able to insert something like this in your textarea? <style> .className { font

Grails yui-minify-resources and lesscss-resources conflict

最后都变了- 提交于 2019-12-22 21:44:11
问题 I have my grails application that use lesscss-resources plugin (v 1.3.0.3). I would like to use also the yui-minify-resources plugin (v. 0.1.5). I installed the plugin using: grails install-plugin yui-minify-resources But now when I try to start the application I have an exception: 2012-10-15 12:58:48,901 ERROR org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [resources:1.1.6]: java.lang.NoSuchMethodError: org/mozilla/javascript