1. #31
    Sencha User
    Join Date
    Nov 2012
    Posts
    7
    Vote Rating
    0
    raffyaslanbeily is on a distinguished road

      0  

    Default


    Quote Originally Posted by yyogev View Post
    Yes, I know of this problem. I've lived with it for over 2 years, but never managed to solve it (tried for a few hours and then abandoned it). It is more complicated than it looks.

    Notice also that in IE it does not happen.
    the problem here is in html_code stuff
    if you remove it, everything seems to be OK:
    Code:
           /*var html_code =
                "div#" + gidPrefix +
                " div.x-grid3-row {padding-left:" + (gfLen*12) + "px}" +
                "div#" + gidPrefix + " div.x-grid3-header {padding-left:" + (gfLen*12) + "px}";*/
            Ext.getDoc().child("head").createChild({
                tag: 'style',
                id: gidPrefix + "-style"/*,
                html: html_code*/
            });
    it solves this particular problem at once

  2. #32
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      2  

    Default MultiGrouping Grid and Summary for ExtJS 3.4 - v0.2

    MultiGrouping Grid and Summary for ExtJS 3.4 - v0.2


    Here it is. Usual disclaimer: Use at your own risk, I'm not liable.

    For ExtJS v3.4, MultiGroupingPanel & Summary v0.2.

    - Many bug fixes and minor improvements.
    - Added events: beforeapply and render
    - Default CSS for color coding the grouping headers and summaries are only colored up to 4 levels deep. blue, green, yellow, grey. Simply add more numbered styles to the css to add more colors. x-grid-group-hd-# and x-grid3-summary-row-# (The default max grouping is set to 3.)
    - Externalized the i18n text into their own object, see config docs.
    - The only thing I didn't get time to do was externalize the css classes. Currently everything is using the prefix "ss_*" for class names. Just find/replace to put in your own icons or styles. Otherwise, it shouldn't hurt anything. I just wanted to get something released quickly.

    If you find bugs, questions, or comments; let me know either here or via PM.

    MultiGroupingPanel and Summary 0.2.zip

    Summary Example Usage:
    Code:
    var summaryConfig = {
    showHeader: true,
    //showToggle: true, //disableSummaryColors: true,
    listeners: {
    beforeapply: function (summary, data, g) {
    // create new group data, save id g.buyId = Ext.id(); // custom header, need to override headerTpl //data.header.custom = 'data'; //data.hstyle = ''; // custom footer data.fstyle = ''; data.footer = '<div style="text-align:right;"><div id="' + g.buyId + '" style="display:inline-block;"></div></div>';
    },
    render: function (summary, data, g) {
    // defer all creation until after the summary nodes render summary.createButton.defer(1, summary, [g.buyId, g,
    {
    text: 'Buy Now', iconCls: 'ss_sprite ss_tick', handler: function (button, e) {
    Ext.Msg.alert('Alert', button.text);
    }
    }
    ]);
    }
    }
    // custom functions
    , createButton: function (id, group, config) {
    new Ext.Button(config).render(id);
    }
    }; var summary = new Ext.ux.GroupSummary(summaryConfig ); gridPlugins.push(summary); // this is the array passed to GridPanel's config.plugins
    * this example will render an ExtJS Button in the footer summary area right aligned.
    Last edited by TonyBones; 29 Nov 2012 at 10:33 AM. Reason: fixed commented out header example code

  3. #33
    Sencha User
    Join Date
    Nov 2012
    Posts
    7
    Vote Rating
    0
    raffyaslanbeily is on a distinguished road

      0  

    Default


    TonyBones - thanks a lot! so far it works perfectly for me

  4. #34
    Touch Premium Member msinn's Avatar
    Join Date
    Jul 2009
    Location
    in front of my pc
    Posts
    280
    Vote Rating
    5
    msinn is on a distinguished road

      2  

    Default


    @TonyBones
    thank you a lot for your shared work! This is very helpful
    I found some bugs:

    1. in MultiGroupingStore.js, line 281, the method clearGrouping() calls sort() without params, so you'll have the first element of the array f 'undefined'
    PHP Code:
    if (f.length 1) {
                return 
    false;
            } 
    should be something like this
    PHP Code:
    if (Ext.isEmpty(f[0])) {
                return 
    false;
            } 
    2. in MultiGroupingView.js, line 794, updateGroupWidths()
    PHP Code:
    updateGroupWidths: function () {
            if (!
    this.grid.store.enableMultiGroupingExt.ux.grid.MultiGroupingView.superclass.updateGroupWidths.call(this);

            if (!
    this.canGroup() || !this.hasRows()) {
                return;
            }
            var 
    tw Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth this.getScrollOffset()) + 'px';
            var 
    gs this.getGroups(); //you get the groups over Ext.DomQuery.select("div.x-grid-group", this.mainBody.dom); - line 629
            
    var groupField this.getGroupField();
            var 
    gfLen groupField groupField.length 0;
            for (var 
    0len gs.lengthleni++) {

                var 
    this.getGroupById(gs[i].id); // and you add group and groupId with Ext.util.Format.htmlEncode, line 490, so it works with  var g = this.getGroupById(Ext.util.Format.htmlEncode(gs[i].id));
                
    var leaf g.groupName == groupField[gfLen 1]
                if (
    leaf)
                    
    gs[i].firstChild.style.width tw;
                else
                    
    delete gs[i].firstChild.style.width;
            }
        } 
    3. MultiGroupingView.js, line 168, createQuickGroupingPanel(), there is no Array.contains(), at least not in ExtJS3
    PHP Code:
    var isGrouped groupField.contains(groupBy); 
    should be something like this, or you add contains to the Array prototype
    PHP Code:
    var isGrouped false;
                var 
    groupField.length;
                while(
    i--){
                    if(
    groupField[i]==groupBy){
                        
    isGrouped true; break;
                    }
                } 
    First I would like to thank you for your time and knowledge

    Win 7 Ext JS 4.1.3 IE(6-9), FF17

  5. #35
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      1  

    Default


    Cool, thanks for the updates. I'll check them out when I get a little time and get back to you.

    The contains method was one of mine, sorry.
    Code:
    Array.prototype.contains = function(obj, testFunc) {
        for (var i = 0; i < this.length; i++) {
            if (testFunc) {
                if (testFunc(this[i],obj)) return true;
            } else {
                if (this[i] === obj) return true;
            }
        }
        return false;
    };

  6. #36
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    @msinn
    So I understand point #1, I fixed it a slightly different way, but has the same result. Thanks for pointing this one out, as I only use/tested remote sorting/grouping/etc. I haven't done any local operations.

    I don't quite understand what you are pointing out in #2 though.
    The value of the column being grouped on is used in the ID of the DOM node, so I escape only this value within the overall ID.

    But getGroups() and getGroupById(id) don't return the same objects. First one returns the DOM nodes of the grouped headers. The second returns the internal group Object, plain old js object, that has all the data for that group. In this function we get the group Object by using the DOM node ID. Shouldn't require any extra encoding. Is there a problem your seeing?

  7. #37
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    @msinn
    I finally ran into the #2 point above and got to see what you were talking about! Good catch! I used your fix and all is working again. Although I'm wondering if there is a better way around this without having to query the dom structure. I should be able to pull directly from the in memory list...hmmmmm

  8. #38
    Sencha Premium Member RonaldBrinkerink's Avatar
    Join Date
    Feb 2009
    Location
    Haaksbergen, Netherlands
    Posts
    38
    Vote Rating
    0
    RonaldBrinkerink is on a distinguished road

      0  

    Question fieldname instead of fieldvalue displayed as group

    fieldname instead of fieldvalue displayed as group


    @TonyBones,

    I am getting the groupfield name as a groupvalue instead of the groupfields value.
    can you help me out here?

    Thanks and regards,
    Ronald

  9. #39
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    Quote Originally Posted by RonaldBrinkerink View Post
    @TonyBones,

    I am getting the groupfield name as a groupvalue instead of the groupfields value.
    can you help me out here?
    Can you provide any code? Or any details? A screenshot?

  10. #40
    Sencha Premium Member RonaldBrinkerink's Avatar
    Join Date
    Feb 2009
    Location
    Haaksbergen, Netherlands
    Posts
    38
    Vote Rating
    0
    RonaldBrinkerink is on a distinguished road

      0  

    Talking [SOLVED] fieldname instead of fieldvalue displayed as group

    [SOLVED] fieldname instead of fieldvalue displayed as group


    @TonyBones

    appologies. the groupTextTpl contains {text} : {group} by default
    in my implementation i had overridden this with {text} ({[values.rs.length]}) in an extention of the view.

    thanks for your reply and effort. I'm trying to implement this further. Looking good so far.

    Regards, Ronald

Similar Threads

  1. How to set start/end TIME for Ext.calendar.CalendarPanel (Ext 3.3. beta)
    By omermx in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 8 Dec 2010, 12:21 PM
  2. How can we make groupField to be Selectable in Ext.ux.MultiGroupingPanel
    By ramana_l_v in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 31 Dec 2009, 4:47 PM
  3. Ext.nd Beta 1
    By RWaters in forum Ext.nd for Notes/Domino
    Replies: 12
    Last Post: 14 Feb 2008, 12:53 PM
  4. Ext 2.0 Beta 1 Now Available
    By ReyBango in forum Community Discussion
    Replies: 4
    Last Post: 12 Oct 2007, 6:04 AM
  5. [beta] Ext.ux.ItemSelector (part of Ext.ux.Multiselect v1.2)
    By tjstuart in forum Ext 1.x: User Extensions and Plugins
    Replies: 36
    Last Post: 20 Sep 2007, 3:42 PM

Thread Participants: 19

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