Giter Club home page Giter Club logo

enhancejs's People

Contributors

borgboston avatar johnbender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enhancejs's Issues

Experience Toggle Link not available at $(document).ready()

To move the link, as described on p134 of DWPE, I have to use a timeout:

$(document).ready(function() {
   var moveLink = function() {
       var link = $('.enhanced_toggleResult');
       console.log(link.length);
   };
   setTimeout(moveLink, 1000);
});

Because I'm loading a few JavaScript files, a timeout of around a second seems to be working for me. However, if end users have slower links, maybe that time period should be greater. This feels wrong.

Couldn't the link be created once the capabilities tests have been completed, and before additional CSS and scripts are downloaded?

enhance.forcePass() failing

I am trying to create a file upload utility using Enahnce, and I am trying to always show it in high-bandwidth version in IE8 (I also wanna remove the appenDtoggleLinks altogether:

For some reason the following code will not work:

<script type="text/javascript"> // Run capabilities test enhance({ loadScripts: [ 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', 'scripts/jQuery.fileinput.js', 'scripts/example.js' ], loadStyles: ['css/enhanced.css'] }); enhance.forcePass(); </script>

Can anyone tell me what I am doing wrong? How can I force a pass?

Media Types not working in Konqueror

Observed in Konqueror 4.6.5.

If I specify a media type in the call to enhance(), then all CSS fails (including basic.css, i.e. not loaded via enhance.js).

This will not work:

enhance({
    alertOnFailure: true,
    loadStyles: [
        {href: 'enhanced.css', media: 'screen'}
    ]
});

However, the following works OK:

enhance({
    alertOnFailure: true,
    loadStyles: [
        'enhanced.css'
    ]
});

Also, post-test, enhance.query('screen') returns false.

I did some digging, and in the function assigned to mediaquery, the expression divWidth == 10 is returning false.

It looks like the dynamically injected styleblock is not being applied to the node at #ejs-qtest.

enhance.forceFail() failing, settings undefined

When running enhance.forceFail(); some time after the enhance() script has excetuted I get "Settings undefine" in the console. It seems like "settings.testName" is unreachable.

I guess the same priblem applies to issue #5 as well.

When running multiple tests, multiple toggleResult anchors with identical class appended to document

I have in my <head> section this code:

<script type="text/javascript">
//<!--
enhance({
    loadStyles: [
        'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css',
        '/_assets/css/precedent/desktop.css'
    ],
    loadScripts: [
        'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js',
        'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js',
        '/_assets/js/precedent/desktop.js'
    ],
    onScriptsLoaded: function() {
        scriptsLoaded();
    }
});
//-->
</script>

That's generic. On a particular page, I want to load additional JavaScript in the enhanced experience, so I have this extra code, still inside <head>:

<script type="text/javascript">
//<!--
enhance({
    testName:         "enhancedCourseSearch",
    loadScripts:      [ "/_assets/js/precedent/course-search.js" ]
});
//-->
</script>

I'm seeing this appended to the end of my document:

<a href="#" class="enhancedCourseSearch_toggleResult">View high-bandwidth version</a>
<a href="#" class="enhancedCourseSearch_toggleResult">View high-bandwidth version</a>

Setting testName in the second call to enhance() has resulted in both anchors having the same name.

AFAICT, the first anchor should have a class of enhanced_toggleResult.

Bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.