万本电子书0元读

万本电子书0元读

顶部广告

Moodle JavaScript Cookbook电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Alastair Hole

出  版  社:Packt Publishing

出版时间:2011-04-26

字       数:104.1万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This is a cookbook that contains a list of recipes explaining step-by-step how to use JavaScript in Moodle. The first two chapters concentrate on the basics of how to start working with JavaScript and the YUI while the later chapters show how to use these techniques as a basis for implementing more complete functionality. This book is aimed at developers and administrators comfortable with customizing Moodle with the use of plugin modules, themes, and patches who want to make their site more dynamic. If you have prior knowledge of HTML, PHP, and CSS and a good working knowledge of the underlying structure of Moodle, then this book is for you. No prior experience with JavaScript is needed.
目录展开

Moodle JavaScript Cookbook

Table of Contents

Moodle JavaScript Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Combining Moodle and JavaScript

Introduction

Creating a new Moodle PHP page

Getting ready

How to do it...

How it works...

Loading a JavaScript file

Getting ready

How to do it...

How it works...

Loading a JavaScript file in <head>

Getting ready

How to do it...

How it works...

Generating a JavaScript function call from PHP

Getting ready

How to do it...

How it works…

Passing variables from PHP to JavaScript

Getting ready

How to do it...

How it works…

Ensuring compliance with XHTML Strict

Getting ready

How to do it...

How it works…

Retrieving language strings from Moodle

Getting ready

How to do it...

How it works…

2. Moodle and Yahoo! User Interface Library (YUI)

Introduction

Initializing the YUI 3 library

Getting ready

How to do it...

How it works...

Loading additional YUI modules

How to do it...

Loading YUI 2 modules from YUI 3

Getting ready

How to do it...

How it works...

Attaching basic event handlers

Getting ready

How to do it...

How it works...

Attaching advanced DOM event handlers

Getting ready

How to do it...

How it works...

Implementing event delegation

Getting ready

How to do it...

How it works...

Debugging with the YUI console

Getting ready

How to do it...

How it works...

3. Moodle Forms Validation

Introduction

Adding a required field

Getting ready

How to do it...

How it works...

Adding a field with a maximum length

Getting ready

How to do it...

How it works...

Adding a field with a minimum length

Getting ready

How to do it...

How it works...

Adding a field length within in a specified range

Getting ready

How to do it...

How it works...

Adding a valid e-mail address field

Getting ready

How to do it...

How it works...

Adding custom validation with a Regular Expression

Getting ready

How to do it...

How it works...

Adding a field that accepts only alphabetic characters

Getting ready

How to do it...

How it works...

Adding a field that accepts only alphanumeric characters

Getting ready

How to do it...

How it works...

Adding a field that accepts only numeric characters

Getting ready

How to do it...

How it works...

Rejecting punctuation characters

Getting ready

How to do it...

How it works...

Rejecting input without a leading zero

Getting ready

How to do it...

How it works...

Comparing with another field

Getting ready

How to do it...

How it works...

Adding a custom JavaScript validation function callback

Getting ready

How to do it...

How it works...

4. Manipulating Data with YUI 3

Introduction

Using IO to request a URI

How to do it...

How it works...

Using IO's alternative transport method for requesting external URIs

Getting ready

How to do it...

How it works...

Using PHP as a proxy to load data from an external domain

How to do it...

How it works...

Parsing XML with DataSource

How to do it...

How it works...

Parsing JSON with DataSource

Getting ready

How to do it...

How it works...

Parsing CSV data with DataSource

Getting ready

How to do it...

How it works...

Retrieving data from a Moodle 2.0 web service

Getting ready

How to do it...

How it works…

5. Working with Data Tables

Introduction

Initializing a YUI DataSource

How to do it...

How it works...

Displaying data

How to do it...

How it works...

Basic column sorting

Getting ready

How to do it...

How it works...

Adding paging

Getting ready

How to do it...

How it works...

Enabling scrolling

Getting ready

How to do it...

How it works...

Enabling editing

Getting ready

How to do it...

How it works...

6. Enhancing Page Elements

Introduction

Adding a text box with auto-complete

How to do it...

How it works...

Adding a combo box with auto-complete

How to do it...

How it works...

Displaying auto-updating data

How to do it...

How it works...

Enabling resizable elements

How to do it...

How it works...

Adding custom tooltips

How to do it...

How it works...

Adding custom button controls

How to do it...

How it works...

7. Advanced Layout Techniques

Introduction

Adding a fly-out navigation menu

How to do it...

How it works...

Adding a drop-down navigation menu

Getting ready

How to do it...

How it works...

Displaying a tree-view navigation menu

How to do it...

How it works...

Adding a tabbed content control

How to do it...

How it works...

Displaying content in a modal window

How to do it...

How it works...

8. Animating Components

Introduction

Fading in an element

How to do it...

How it works...

Fading out an element

How to do it...

How it works...

Scrolling an element

How to do it...

How it works...

Resizing an element

How to do it...

How it works...

Animating with easing

How to do it...

How it works...

Moving an element along a straight path

How to do it...

How it works...

Moving an element along a curved path

How to do it...

How it works...

Changing an element's color

How to do it...

How it works...

Sequencing multiple animations

How to do it...

How it works...

9. Integrating External Libraries

Introduction

Adding the jQuery framework

Getting ready

How to do it...

How it works...

Adding the MooTools framework

Getting ready

How to do it...

How it works...

Adding the Dojo framework

Getting ready

How to do it...

How it works...

Adding the Prototype framework

Getting ready

How to do it...

How it works...

Adding the script.aculo.us add-on to Prototype

Getting ready

How to do it...

How it works...

There's more…

Adding image enlargement with Lightbox 2

Getting ready

How to do it...

How it works...

There's more…

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部