~ubuntu-branches/ubuntu/trusty/phpmyadmin/trusty

« back to all changes in this revision

Viewing changes to js/makegrid.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2013-10-07 20:18:01 UTC
  • mfrom: (1.2.46)
  • Revision ID: package-import@ubuntu.com-20131007201801-l5l0ril5992p8sxz
Tags: 4:4.0.8-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
         * Send column preferences (column order and visibility) to the server.
362
362
         */
363
363
        sendColPrefs: function() {
364
 
            if ($(g.t).is('.ajax')) {   // only send preferences if ajax class 
 
364
            if ($(g.t).is('.ajax')) {   // only send preferences if ajax class
365
365
                var post_params = {
366
366
                    ajax_request: true,
367
367
                    db: g.db,
716
716
                if ($td.find('a').length > 0) {
717
717
                    var gotoLink = document.createElement('div');
718
718
                    gotoLink.className = 'goto_link';
719
 
                    $(gotoLink).append(g.gotoLinkText + ': ')
720
 
                        .append($td.find('a').clone().click(
721
 
                            function (event) {
722
 
                                event.preventDefault();
723
 
                                window.open(this.href);
724
 
                            }));
 
719
                    $(gotoLink).append(g.gotoLinkText + ': ').append($td.find('a').clone());
725
720
                    $editArea.append(gotoLink);
726
721
                }
727
722
 
983
978
 
984
979
                    // force to restore modified $input_field value after adding datepicker
985
980
                    // (after adding a datepicker, the input field doesn't display the time anymore, only the date)
986
 
                    if (is_null 
987
 
                        || current_datetime_value == '0000-00-00' 
 
981
                    if (is_null
 
982
                        || current_datetime_value == '0000-00-00'
988
983
                        || current_datetime_value == '0000-00-00 00:00:00'
989
984
                    ) {
990
985
                        $input_field.val(current_datetime_value);
991
986
                    } else {
992
 
                        $editArea.datetimepicker('setDate', current_datetime_value);                        
 
987
                        $editArea.datetimepicker('setDate', current_datetime_value);
993
988
                    }
994
989
                    $editArea.append('<div class="cell_edit_hint">' + g.cellEditHint + '</div>');
995
990
 
1212
1207
                        }
1213
1208
                        if (data.success == true) {
1214
1209
                            PMA_ajaxShowMessage(data.message);
1215
 
                            
 
1210
 
1216
1211
                            // update where_clause related data in each edited row
1217
1212
                            $('td.to_be_saved').parents('tr').each(function() {
1218
1213
                                var new_clause = $(this).data('new_clause');
1589
1584
 
1590
1585
            function startGridEditing(e, cell) {
1591
1586
                if (g.isCellEditActive) {
1592
 
                    g.saveOrPostEditedCell();                    
 
1587
                    g.saveOrPostEditedCell();
1593
1588
                } else {
1594
1589
                    g.showEditCell(cell);
1595
1590
                }
1627
1622
            $(t).find('td.data.click2')
1628
1623
                .click(function(e) {
1629
1624
                    $cell = $(this);
1630
 
                    // In the case of relational link, We want single click on the link 
 
1625
                    // In the case of relational link, We want single click on the link
1631
1626
                    // to goto the link and double click to start grid-editing.
1632
1627
                    var $link = $(e.target);
1633
1628
                    if ($link.is('.grid_edit.relation a')) {
1637
1632
                        clicks = (clicks == null) ? 1 : clicks + 1;
1638
1633
 
1639
1634
                        if (clicks == 1) {
1640
 
                            // if there are no previous clicks, 
 
1635
                            // if there are no previous clicks,
1641
1636
                            // start the single click timer
1642
1637
                            timer = setTimeout(function() {
1643
1638
                                // temporarily remove ajax class so the page loader will not handle it,
1807
1802
            g.showSortHint = true;
1808
1803
            $(t).find("th.draggable").tooltip("option", {
1809
1804
                content: g.updateHint()
1810
 
            }); 
 
1805
            });
1811
1806
        })
1812
1807
        .mouseleave(function(e) {
1813
1808
            g.showSortHint = false;
1814
1809
            $(t).find("th.draggable").tooltip("option", {
1815
1810
                content: g.updateHint()
1816
 
            }); 
 
1811
            });
1817
1812
        });
1818
1813
 
1819
1814
    // register events for dragging-related feature