yui

HTTPS and external (CDN) hosted files?

别来无恙 提交于 2019-12-28 02:44:09
问题 I have a page that references a couple of externally hosted javascript files - namely, jQuery on Google and YUI using YUI Loader. The trouble is when I access the page via HTTPS the browser complains of mixed insecure content, since the external javascript files are being accessed using http instead of https. What's a good way to deal with this, accessing the external jQuery and YUI Loader objects with HTTPS? 回答1: Assuming the CDN provider has an https version, you can use protocol-relative

What are the typical reasons Javascript developed on Firefox fails on IE? [closed]

狂风中的少年 提交于 2019-12-28 01:38:51
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I developed some javascript enhanced pages that run fine on recent Firefox and Safari. I missed to check in Internet Explorer, and now

YUI3 events not working in Firefox or Opera, works fine in Chrome though

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 16:44:33
问题 I have a very simple YUI3 script which changes background of a web page. Here is the source <html> <head> <title>YUI 3 events do not work!</title> </head> <body id="doc-body"> <div id="rgbvalues"> </div> <script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js" charset="utf-8"></script> <script type="text/javascript"> //use node and event modules YUI().use("node", "event", function(Y){ var handleClick = function(e) { var docBody = Y.one("#doc-body"); //equivalent to $(element) in

YUI.getElementsBy equivalent to jQuery

北战南征 提交于 2019-12-25 02:34:09
问题 Is there any JQuery method/implementation that equivalent to YUI.getElementsBy? YUI.getElementsBy ( method , tag , root , apply , o , overrides ) thanks, Simon 回答1: The description of that method is as follows: Array getElementsBy ( method , tag , root , apply , o , overrides ) Returns an array of HTMLElements that pass the test applied by supplied boolean method You can replicate that functionality in jQuery with the filter method, and if you want to return an array of HTMLElement objects,

ContentEditable iframe is not editable in firefox

一世执手 提交于 2019-12-24 14:17:30
问题 I am having an issue with contentEditable iframes in Firefox. I created an iframe for pasting rich text and it worked excellently in Chrome. However, for some reason the iframe is not editable in Firefox and IE. When I load the iframe in FF, the cursor blinks in the iframe and then disappears, never to return. Here is the HTML as it loads in Chrome: <iframe id="atto_pastespecial_iframe" frameborder="0" style="border: 1px solid gray"> #document <html> <head></head> <body contenteditable="true"

YUI DataTable in ASP.NET MVC 3

南楼画角 提交于 2019-12-24 12:43:10
问题 I am using ASP.NET MVC 3. I am trying to populate my YUI data table with data from my database. In my view I have the following code snippets: @model IEnumerable<MyProject.News> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <link href="http://yui.yahooapis.com/2.8.2r1/build/reset-fonts-grids/reset-fonts-grids.css" rel="stylesheet" type="text/css"> <link href="http://yui.yahooapis.com/2.8.2r1/build/base/base-min.css" rel="stylesheet" type="text/css"> <link href="http://yui

change portlet title from code in Liferay without Jquery

[亡魂溺海] 提交于 2019-12-24 12:00:22
问题 I'm having solution to change title of portlet through JQuery. $('#idOfPortlet').find('.portlet-title').html('new title'); But we dont want to use JQuery in our project. Is there any solution to change title of portlet using YUI or anyother thing through code? Thanks in Advance. Regards, Mayur Patel 回答1: If the version of Liferay you're on is using YUI 3, then this aught to do it: Y.one('#idOfPortlet .portlet-title').setContent('new title'); I'm not sure if Liferay exposes the YUI instance as

YUI: find event handlers for a node

佐手、 提交于 2019-12-24 06:45:28
问题 I want suspend the click event for a node temporally . I want to get the click event handler for a node and detach it and then reattach it when i want it again. I am using YUI 3. Can some one tell me how could i query the click event handlers for a node and detach them ? 回答1: See Y.Event.getListeners - http://yuilibrary.com/yui/docs/api/classes/Event.html#method_getListeners For all the various ways you can detach events, see http://yuilibrary.com/yui/docs/event/#detach-methods 回答2: on()

How do I use YUI3 in a Chrome extension?

痞子三分冷 提交于 2019-12-24 02:58:27
问题 If I download the minified YUI3 loader and include it in my background.html I get the following error: Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Can YUI3 be used in an extension? 回答1: It looks like it's blocking you from using eval(). Make sure you have the following line in your manifest. "content_security_policy":

django-pipeline not compressing

廉价感情. 提交于 2019-12-23 20:10:33
问题 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