1. #1
    Sencha User crocop21's Avatar
    Join Date
    May 2012
    Posts
    65
    Vote Rating
    0
    crocop21 is an unknown quantity at this point

      0  

    Default Problems with Template

    Problems with Template


    Hi, I am working with Architect and i am trying to do some implement using template, with Resources css and js the problem is only in my function from my js, i have a class named collapse, who is trying to showing and closing my table, but doesnt work, if somebody can help i am trying alot but still cant resolve this problem. Thanks....

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,877
    Vote Rating
    62
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    I think we need less data here. A beter understanding of what's not working would be helpful. It would appear your mixing Jquery and Ext JS which is fine but know that getting Jquery help will be harder to come by.

    $('div.section.collapsed, div.subsection.collapsed')

    this won't work as you should be doing div.section .collapsed (note the space) as it's not 2 classes on the same div bug a child of a div with a class of section
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha User crocop21's Avatar
    Join Date
    May 2012
    Posts
    65
    Vote Rating
    0
    crocop21 is an unknown quantity at this point

      0  

    Default


    Thanks for the answer, i think the problem why Jquery doesnt work with architect maybe because the declaration of the libraries in my app, i created a field for try the method onblur on this and still doesnt work so strange, if somebody can help me, i will be so much thankful.

    My view

    Code:
    Ext.define('MyApp.view.MyView', {
        extend: 'Ext.view.View',
    
        height: 250,
        width: 400,
        itemSelector: 'div',
        store: 'users',
    
        initComponent: function() {
            var me = this;
    
            Ext.applyIf(me, {
                tpl: [
                    '<tpl for="."><div><td><input value="" type="text" id="i_numero_factura"  name="i_numero_factura" maxlength="12" class="span3"></td></div></tpl>'
                ]
            });
    
            me.callParent(arguments);
        }
    
    });
    This is my function Jquery
    Code:
    $(document).ready(function(){
    
       
        $('#i_numero_factura').blur(function() {
      alert('Handler for .blur() called.');
    });
    
    });
    And my APP with the libraries i add in Resources in Architect

    Code:
    <!DOCTYPE html>
    
    <!-- Auto Generated with Sencha Architect -->
    <!-- Modifications to this file will be overwritten. -->
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>ejemtem3</title>
        <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-4.0.7-commercial/resources/css/ext-all.css"/>
        <script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.7-commercial/ext-all-debug.js"></script>
        <script type="text/javascript" src="app.js"></script>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type="text/javascript" src="http://127.0.0.1/ejemplotemplateGore/primerejemplogore1/primerejemplogore1/primerejemplogore1/js_ssep.js"></script>
    </head>
    <body></body>
    </html>

  4. #4
    Sencha User crocop21's Avatar
    Join Date
    May 2012
    Posts
    65
    Vote Rating
    0
    crocop21 is an unknown quantity at this point

      0  

    Default


    Nobody cant help?...

  5. #5
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,877
    Vote Rating
    62
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Ok so the issue could be that you are using JQuery's document on ready which is likely firing before that template has been applied and available. Try to run the same
    Code:
    $('#i_numero_factura').blur(function() {
      alert('Handler for .blur() called.');
    });
    from the console and I bet it does what you want.

    Also note that in ExtJS this same code would be
    Code:
    Ext.onReady(function() {
        Ext.get('#i_numero_factura').on('blur', function() {
          alert('Handler for .blur() called.');
        });
    });
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  6. #6
    Sencha User crocop21's Avatar
    Join Date
    May 2012
    Posts
    65
    Vote Rating
    0
    crocop21 is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by Phil.Strong View Post
    Ok so the issue could be that you are using JQuery's document on ready which is likely firing before that template has been applied and available. Try to run the same
    Code:
    $('#i_numero_factura').blur(function() {
      alert('Handler for .blur() called.');
    });
    from the console and I bet it does what you want.

    Also note that in ExtJS this same code would be
    Code:
    Ext.onReady(function() {
        Ext.get('#i_numero_factura').on('blur', function() {
          alert('Handler for .blur() called.');
        });
    });
    Thanks for the answer, still doesnt work i try calling my function from Resources firts my
    https://ajax.googleapis.com/ajax/lib.../jquery.min.js
    then my
    http://127.0.0.1/ejemplotemplateGore...em3/js_ssep.js

    Code:
    $('#i_numero_factura').blur(function() {
      alert('Handler for .blur() called.');
    });
    which will be the problem?

  7. #7
    Sencha User crocop21's Avatar
    Join Date
    May 2012
    Posts
    65
    Vote Rating
    0
    crocop21 is an unknown quantity at this point

      0  

    Default


    I doubt architect can work with jquery functions definitely ..

  8. #8
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,877
    Vote Rating
    62
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Did you try running it form chrome inspector console? Or whichever browser your using
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  9. #9
    Sencha User crocop21's Avatar
    Join Date
    May 2012
    Posts
    65
    Vote Rating
    0
    crocop21 is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by Phil.Strong View Post
    Did you try running it form chrome inspector console? Or whichever browser your using
    Yes i did with firebug didnt had any errors, i tried everything... somebody help me...

  10. #10
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,877
    Vote Rating
    62
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    did you literally run

    $('#i_numero_factura').blur(function() {
    alert('Handler for .blur() called.');
    });

    in the console?

    and check to see if blurring the field calls alert?

    also did you inspect the dom (elements tab) to see if a input with id field was ever created?

    I'll assume you can see n number of input fields on screen!

    also I was wrong before not sure about jQuery but ExtJS does not like a # for id's it can be removed for desired effect

    Ext.onReady(function() {
    Ext.get('#i_numero_factura').on('blur', function() {
    alert('Handler for .blur() called.');
    });
    });
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi