Menu

#541 JQuery Solution for enum set issue ID: 1494550

closed-out-of-date
Interface (183)
1
2010-08-23
2010-04-13
sutharshan
No

I have attached the patch file and the new files to be added in order to use jQuery (themes and js files)
This will pop up a jQuery dialog box to type the enum,set values and each values should be typed in each new line. its very easy to use and userfriendyl since users need not to type the quotation marks, commas and so on.

Hope its usefull for all.

Discussion

1 2 > >> (Page 1 of 2)
  • sutharshan

    sutharshan - 2010-04-13

    Please extract the zip file and add the files iside the js folder.
    This zip file contains the followings.
    1. js and css theme files needed for jQuery dialog box
    2. javascript file - contains the functions to popup jQuery dialog box for set and enum.

     
  • Michal Čihař

    Michal Čihař - 2010-04-13
    • assigned_to: nobody --> nijel
     
  • Michal Čihař

    Michal Čihař - 2010-04-13

    1. There is already standard way to include js files, please use it.
    2. Please do not use short php open tags.
    3. The dialog is too small for textarea in my browser.
    4. The resize control in dialog is on left side, while it probably should be on right side.
    5. The most of js files you include are already present in master.
    6. Please use external binding of js instead of inline code.

     
  • sutharshan

    sutharshan - 2010-04-13

    Can any one let me now, how to add new js files and css files?

    thank you.

     
  • sutharshan

    sutharshan - 2010-04-13

    Can any one let me know, how to add new js files and css files?

    thank you.

     
  • Michal Čihař

    Michal Čihař - 2010-04-13

    You can use git add to add them to the repository.

     
  • sutharshan

    sutharshan - 2010-04-14

    I'm working on it. I'll make the changes and update it. thank you

     
  • sutharshan

    sutharshan - 2010-04-14

    Hi, can anyone please update the whole jQuery files to the repository including the themes,ui scripts?

     
  • sutharshan

    sutharshan - 2010-04-14

    I have found few abnormal behaviors while doing the coding for this particular section. I think these may helpful for future changes.
    1. The text area width and height cannot be controlled by using the rows & cols attributes. I have used inline css to make fix size at last.
    2. The jQuery width and height was unable to change using height: , and width:. Also the resize control was in the left side.

    The same code is working perfectly normal and gives the expected output when it runs separatly without adding inside these files. But its not working as expected when integrated into the phpMyAdmin files.

    I think the issue is due to some other javascript that was present already. still didnt figureout which causes this abnormal behavior. if anyone knows please let me know.
    thank you

     
  • Michal Čihař

    Michal Čihař - 2010-04-15

    There might have been some interactions with mootools, which was just removed in git, can you try if you still have problems with this?

     
  • Michal Čihař

    Michal Čihař - 2010-04-15

    Also there should be now full jquery ui including theme.

     
  • sutharshan

    sutharshan - 2010-04-18

    after removing mootools its working without any errors in my local copy.

    Only problem that i have now is that I'm unable to add the js file in the standard way that was used before. Its not working for me.
    This is how i have added the js file
    $GLOBALS['js_include'][] = 'enum.js';
    The js file is added inside js directory
    but its not working. I couldnt figure out whats wrong with that. can anyone help me in this?

     
  • sutharshan

    sutharshan - 2010-04-18

    patch file

     
  • sutharshan

    sutharshan - 2010-04-18

    Javascript file

     
  • sutharshan

    sutharshan - 2010-04-18

    I have attached patch file and the js file to be added to the repository.
    I tried to add directly to the repository, but its failed. I dont know the reason why i couldnt be able to add the js file.
    But i have attached the file with this.
    Everything works fine and the previous errors are sort out.
    But still i have the problem of calling the js file in the standard way. can anyone guide me regarding this? Also please upload the js file to repository.

    thank you

     
  • Marc Delisle

    Marc Delisle - 2010-04-18

    Use the js_include mechanism from a higher-level file like tbl_alter.php. I have sent to the devel list a longer explanation.

     
  • sutharshan

    sutharshan - 2010-04-18

    final_patch

     
  • sutharshan

    sutharshan - 2010-04-18

    I have attached the final patch file. No need to add the enum.js file. Only the patch file is enough since the functions are added in functions.js

    Also the inline js calls are omitted in this patch. jquery focus event used.

     
  • Michal Čihař

    Michal Čihař - 2010-04-20

    1. Please avoid using global js variables with such common name as id.
    2. The div should have default style to be hidden to avoid appearing in browsers without javascript.

     
  • sutharshan

    sutharshan - 2010-04-20

    final patch_20_04_10

     
  • sutharshan

    sutharshan - 2010-04-20

    its done...:P

     
  • Michal Čihař

    Michal Čihař - 2010-04-21

    When adding column to table, I get following error:

    $("#dialog").dialog is not a function
    js/functions.js:1733

     
  • sutharshan

    sutharshan - 2010-04-21

    edited patch_21_04_10

     
  • sutharshan

    sutharshan - 2010-04-21

    sorry. i forget to add the jquery js files to tbl_addfield.php.
    now its working fine.

     
  • Michal Čihař

    Michal Čihař - 2010-04-21

    Another thing I just noticed: you should escape quotes when constructing the value. Also parting escaped quotes does not seem to work.

     
1 2 > >> (Page 1 of 2)