joshbirk / onestarter

A jQuery plugin for easily making HTML appear in the style of Salesforce1
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

Cannot read property 'client' of undefined #2

Open Opopanax opened 10 years ago

Opopanax commented 10 years ago

image

I'm using the zips provided in the recent release. When the page loads the console returns "Uncaught typeError: Cannot read property 'client' of undefined" Screenshot above includes all the text. This causes the page to load but majority of the styles aren't applied.

<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'icons.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'styles.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'OneStarter.css')}"/>

<apex:includeScript value="{!URLFOR($Resource.TouchSwipe,'jquery.touchSwipe.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.OneStarter,'jquery.onestarter.js')}"/>  
joshbirk commented 10 years ago

This is because (in part) the publisher.js file is not included. Including that will fix this, but I would prefer that is not a requirement. So looking at the checks in the plugin so that it doesn't try to execute anything canvas when it can't. I'll keep this open until that's fixed.

Opopanax commented 10 years ago

Ahh, I forgot - I'm copy and paste inept apparently. Adding that did remove the error. I still get those GET error with https://c.cs16.visual.force.com/resource/1393000363000/OneStarter/fonts/proximanovasoft-semibold-webfont.ttf

https://c.cs16.visual.force.com/resource/1393000363000/OneStarter/fonts/proximanovasoft-regular-webfont.ttf

https://c.cs16.visual.force.com/resource/1393000363000/OneStarter/fonts/proximanovasoft-medium-webfont.ttf

Not quite sure what line it's trying to get those files.

joshbirk commented 10 years ago

It's S1's moderately unique font. I think it is actually the CSS which is calling it out. It may be something I can include the zip, will test. Shouldn't break overall styling though.

Opopanax commented 10 years ago

Ah Ha! Some HTML 5 attributes were breaking the styling on the Removing type="email" html-placeholder="you@example.com" html-title="Please enter an example.com email address"

Fixed the style on the input field. Stylings are still broken on the

<div id="one-app">        
    <apex:form id="MainForm">
        <apex:outputpanel id="errors">
            <apex:pagemessages />  
        </apex:outputpanel>
        <div id="form">
            <h2>Attendee SignIn</h2>
            <section>
                <apex:inputfield value="{!FakeContact.Email}"/>
                <apex:commandButton value="Search"  action="{!SearchForAttendee}" rerender="AttendeeInfo,Errors"  oncomplete="restyle();"/>
            </section>
        </div>
        </div>