Tài liệu Drupal 6 JavaScript and jQuery

Thảo luận trong 'Lập Trình' bắt đầu bởi Thúy Viết Bài, 5/12/13.

  1. Thúy Viết Bài

    Thành viên vàng

    Bài viết:
    198,891
    Được thích:
    173
    Điểm thành tích:
    0
    Xu:
    0Xu
    Preface 1
    Chapter 1: Drupal and JavaScript 7
    Do you speak .? 8
    PHP 9
    SQL 10
    HTML 11
    CSS 12
    XML 13
    JavaScript 14
    Drupal's architecture 15
    The Drupal Core 16
    The Theme Engine 18
    Modules 18
    Users, nodes, and blocks 19
    Users 19
    Blocks 20
    Nodes 22
    Drupal JavaScript development tools 23
    A good editor 24
    Firebug 24
    The Drupal Devel package 26
    Summary 28
    Chapter 2: Working with JavaScript in Drupal 29
    How Drupal handles JavaScript 30
    Where Drupal JavaScript comes from? 31
    Project overview: printer-friendly page content 32
    Drupal coding standards 34
    Stylistic differences between PHP and JavaScript 35
    The first lines 36
    The print() function 38
    Creating a theme 43
    Full themes and subthemes 44
    Creating a theme: first steps 45
    Creating a theme directory 45
    Creating the .info file 47
    Adding files to the theme 48
    The CSS file 52
    Adding JavaScript to a theme 52
    Overriding a template 52
    Adding the script file 57
    Summary 58
    Chapter 3: jQuery: Do More with Drupal 59
    jQuery: the write less, do more library 59
    A first jQuery script 62
    Getting jQuery 62
    Starting with a basic HTML document 62
    Querying with jQuery (and the Firebug console) 63
    Bye bye, jQuery(); hello $() 67
    Doing more with jQuery 68
    Using jQuery in Drupal 71
    Don't do it yourself! 73
    Project: rotating sticky node teasers 73
    The StickyRotate functions 76
    The init() function 78
    The periodicRefresh() function 86
    Adding an event handler with jQuery 89
    A brief look backward 91
    Summary 92
    Chapter 4: Drupal Behaviors 93
    The drupal.js library 93
    Drupal JavaScript behaviors 95
    Defining a behavior to handle repeatable events 96
    Telling Drupal to attach behaviors 98
    Context and behaviors: bug potential 99
    Project: collapsing blocks 102
    Utilities 107
    Checking capabilities with Drupal.jsEnabled 107
    The Drupal.checkPlain() function (and the jQuery alternative) 108
    The Drupal.parseJson() function 111
    The Drupal.encodeURIComponent() function 112
    The Drupal.getSelection() function 113
    Project: a simple text editor 113
    The main behavior 118
    Step 1: find text areas that need processing 119
    Step 2: add event handlers 119
    Step 3: attach the button bar 120
    Summary 126
    Chapter 5: Lost in Translations 127
    Translations and drupal.js 128
    Translation and languages 128
    Turning on translation support 129
    Getting and installing translations 129
    Configuring languages 130
    Adding the language 130
    Configuring languages 131
    Using the translation functions 133
    The Drupal.t() function 134
    The Drupal.formatPlural() function 136
    Adding a translated string 138
    Project: weekend countdown 139
    Translating the project's strings 144
    Changing a translation file 153
    Summary 154
    Chapter 6: JavaScript Theming 155
    Theming in PHP, theming in JavaScript 155
    The Drupal.theme() function 159
    Project: menus and blocks 161
    Adding a block with a menu in it 162
    Theming a block 164
    Theming a menu 168
    The JavaScript theming module 174
    Theming tables 175
    Sending notifications to the user 178
    Adding links 179
    Project: templates for JavaScript 180
    The node template 181
    From a template to a system: what next? 183
    A template system 184
    Theming with templates 187
    Using the template system 192
    A word of warning 194
    Summary 196
    Chapter 7: AJAX and Drupal Web Services 197
    AJAX, JSON, XHR, AHAH, and Web 2.0 198
    Web application and Web 2.0 198
    The position of AJAX in Web 2.0 199
    Getting technical 200
    Move over, XML 201
    Project: web clips with RSS and AJAX 204
    Really Simple Syndication (RSS) 205
    The project goals 206
    Creating the web clips tool 207
    The WebClips behavior 209
    The WebClips.showItem() function 217
    Project: real-time comment notifications 219
    Displaying comments as notifications 219
    Installing Views and Views Datasource 220
    Creating a JSON view 221
    The comment watcher 226
    The comment watcher behavior 230
    The CommentWatcher.check() function 231
    Theming the comment notification 235
    Managing cookies 237
    Summary 240
    Chapter 8: Building a Module 241
    How modules work 241
    The module structure 242
    The directory 243
    The .info file 243
    The .module file 243
    Where do modules go? 243
    Project: creating a JavaScript loader module 244
    Creating the module directory 245
    A JavaScript sample 246
    The module's .info file 247
    A custom addition 248
    The .module file 248
    The jsloader_help() function 249
    The jsloader_init() function 252
    Project: the editor revisited 256
    First step: creating the module 256
    The CSS file 258
    The bettereditor.module file 258
    The bettereditor.js script 268
    The editor() behavior 272
    The insertTag() function 277
    The addTag() theme 278
    The button() theme function 284
    The buttonBar() theme function 285
    A last question 285
    Summary 286
    Chapter 9: Integrating and Extending 287
    Project: autocompletion and search 287
    The theory 288
    Our plan 289
    First step: creating the taxonomy 289
    The new module 291
    The search autocomplete JavaScript 294
    Project: jQuery UI 299
    What is jQuery UI? 299
    Getting jQuery UI 300
    The accordion module 301
    The .info and .module files 302
    The accordion JavaScript 303
    Project: writing a jQuery plug-in 309
    The plug-in code 310
    A brief introduction to closures 312
    The divWrap() function 315
    Summary 318
    Index 319
     

    Các file đính kèm:

Đang tải...