Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2009
    Posts
    318
    Vote Rating
    47
    firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about

      0  

    Default Devs please give option to select text in a grid

    Devs please give option to select text in a grid


    It seems like it's a very common requirement to select text in a grid. I know my users demand it. There is an override for it in the grid faq for Ext 3. I just spent the last half hour or so trying to apply it to 4. It's similar, but now I have to override both View and TableChunker.

    It was a good experience and I learned some new things about 4, but now I'm asking myself why. It seems like this long standing workaround deserves a new feature. Since you're so radically, redesigning the grids anyway, could you just give us a config option to make the text selectable and save everyone the hassle of having to find the overrides?

    The same can be said for some of the other long standing grid cosmetic issues - letting lines wrap, for example, could be a config option.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,059
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    We're listening... Any of the small feature requests that you want like this, please be sure to post and we'll try to implement them in the 4.x line.

    Thanks,
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2009
    Posts
    318
    Vote Rating
    47
    firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about

      0  

    Default


    Sweet - thank you very much for considering implementing these features.

    It is much appreciated to have the senior developers taking time to respond to feedback like this!

  4. #4
    Ext JS Premium Member
    Join Date
    Mar 2010
    Location
    Barcelona
    Posts
    33
    Vote Rating
    1
    deister is on a distinguished road

      0  

    Default


    +1 on this.

    I tried without success to remove the "x-unselectable" class from the table markup using a grid feature:

    Code:
    Ext.define('Webos.grid.feature.Selectable', {
        extend: 'Ext.grid.feature.Feature',
        alias: 'feature.selectable',
        mutateMetaRowTpl : function(metaRowTpl) {
            var len = metaRowTpl.length;
            for (var idx = 0; idx < len; idx++) {
                metaRowTpl[idx] = metaRowTpl[idx].replace("x-unselectable","").replace('unselectable=\"on\"',"")
            }
    
        }
    });

    Any ideas?

  5. #5
    Sencha Premium Member
    Join Date
    Jan 2009
    Posts
    318
    Vote Rating
    47
    firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about

      0  

    Default


    If you don't mind doing this for every grid on the page, I'd take the direct route and override the templates that generate the html.

    Both the Ext.view.TableChunker.metaRowTpl and the Ext.grid.View cls default must be modified. As an added bonus, refresh on Ext.view.Table invokes table.unselectable so you have to override this method, too.

    Something like:

    Code:
     <style type="text/css">
       .x-selectable, .x-selectable * {
       -moz-user-select: text!important;
       -khtml-user-select: text!important;
      }
     </style>
     
    ...
     
     Ext.view.TableChunker.metaRowTpl = [
                '<tr class="' + Ext.baseCSSPrefix + 'grid-row {addlSelector} {[this.embedRowCls()]}" {[this.embedRowAttr()]}>',
                    '<tpl for="columns">',
                        '<td class="{cls} ' + Ext.baseCSSPrefix + 'grid-cell ' + Ext.baseCSSPrefix + 'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}><div class="' + Ext.baseCSSPrefix + 'grid-cell-inner ' + Ext.baseCSSPrefix + 'selectable" style="{{id}-style}; text-align: {align};">{{id}}</div></td>',
                    '</tpl>',
                '</tr>'
            ];
      
      Ext.override(Ext.grid.View, {
       cls: Ext.baseCSSPrefix + 'grid-view ' + Ext.baseCSSPrefix + 'selectable'
      });
        
      Ext.override(Ext.view.Table, {
          refresh: function(firstPass) {
              var me = this,
                  table;
              //this.saveScrollState();
              me.setNewTemplate();
              
              // The table.unselectable() call below adds a selectstart listener to the table element.
              // Before we clear the whole dataview in the callParent, we remove all the listeners from the
              // table. This prevents a big memory leak on IE6 and IE7.
              if (me.rendered) {
                  table = me.el.child('table');
                  if (table) {
                      table.removeAllListeners();
                  }
              }
              
              me.callParent(arguments);
              //this.restoreScrollState();
              if (me.rendered) {
                  // Make the table view unselectable
                  table = me.el.child('table');
                  if (table) {
                      //table.unselectable();
                  }
                  
                  if (!firstPass) {
                      // give focus back to gridview
                      me.el.focus();
                  }
              }
          }
      });
    I'd love to hear a better way of doing this...

    I really, really wish this had made it into the final 4 release. The workaround for selecting text in 3.x was much easier... I just don't understand why Sencha thinks we don't need this feature. It's been in the Grid Faq for 2-3 forever. IMHO, incorporating all the hacks and workarounds from the FAQ's should have been step number 1 in the redesign process. Why make us reinvent this again?

  6. #6
    Sencha User ykey's Avatar
    Join Date
    Mar 2010
    Location
    USA
    Posts
    245
    Vote Rating
    27
    ykey has a spectacular aura about ykey has a spectacular aura about

      0  

    Default


    Why was the decision made to make grid column text unselectable to begin with? Does it somehow reduce the user experience? I would say more than half of the other JavaScript based grid widgets I have found on the net also restrict cell text selection.

  7. #7
    Sencha User atian25's Avatar
    Join Date
    Oct 2008
    Location
    china
    Posts
    114
    Vote Rating
    2
    atian25 is on a distinguished road

      0  

    Default


    +1 for this.
    @from: china
    @web: http://atian25.iteye.com
    @extensions: (extjs 4.x)
    * Ext.ux.grid.plugin.RowEditing - add some usefull features (v1.4 updated 2011-09-11)
    * Ext.ux.button.AutoRefresher
    * Ext.ux.form.field.DateTime

  8. #8
    Sencha Premium Member
    Join Date
    Jan 2009
    Posts
    318
    Vote Rating
    47
    firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about firefoxSafari has a spectacular aura about

      0  

    Default


    Quote Originally Posted by ykey View Post
    Why was the decision made to make grid column text unselectable to begin with? Does it somehow reduce the user experience? I would say more than half of the other JavaScript based grid widgets I have found on the net also restrict cell text selection.
    I'm not sure. I've heard it theorized that there might have been some problem with other selection mechanisms on the grid (like the row selection model or selecting columns for drag and drop - features other grid widgets might have) but I don't remember any dev actually confirming this. I've never run into a problem having both.

    For an interesting read, here's the original 2.x thread where Condor posted the override that made it into the Grid FAQ:

    http://www.sencha.com/forum/showthre...-in-Grid-cell/

    We're not the only ones who want this request is nothing new...

  9. #9
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    Dallas, TX
    Posts
    204
    Vote Rating
    2
    Justin Noel is on a distinguished road

      0  

    Default


    +1 for this. It sure is a pain not being able to select text in grids.

  10. #10
    Sencha User atian25's Avatar
    Join Date
    Oct 2008
    Location
    china
    Posts
    114
    Vote Rating
    2
    atian25 is on a distinguished road

      0  

    Default


    and
    letting lines wrap
    @from: china
    @web: http://atian25.iteye.com
    @extensions: (extjs 4.x)
    * Ext.ux.grid.plugin.RowEditing - add some usefull features (v1.4 updated 2011-09-11)
    * Ext.ux.button.AutoRefresher
    * Ext.ux.form.field.DateTime

Similar Threads

  1. Cannot select text(only in Firefox) in Grid plugins
    By sandeepdreddy in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 8 Nov 2010, 11:43 AM
  2. how can i give link to text in grid column
    By vijaypatil12 in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 29 Oct 2010, 1:40 AM
  3. Select text inside grid
    By atiqul in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 26 Apr 2010, 6:37 AM
  4. Ext.form.ComboBox javascript equivalent of select option text?
    By summer00 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 21 Apr 2010, 5:40 AM

Thread Participants: 23