CMPE 280 Web UI Design and Development February 28 Class Meeting

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

CSCI 3100 Tutorial 6 Web Development Tools 1 Cuiyun GAO 1.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
Very quick intro HTML and CSS. Sample html A Web Title.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Dawn Pedersen Art Institute. What is Spry? Spry is Dreamweaver’s version of JavaScript libraries. Spry effects alter the look of a page element—or of.
Unit 20 - Client Side Customisation of Web Pages
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Week 12: JQuery Write less, do more.. JQuery Basics Lightweight JavaScript Library – Emphasizes interaction between JavaScript and HTML – Reduces technical.
ICS 665 Jesse Abdul. jQuery UI Overview  jQuery UI javascript library Includes all UI component functionality  jQuery UI CSS framework Includes standard.
Web Page Creation Part II ST: Introduction to Web Interface Design Prof. Angela Guercio.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
CS 174: Web Programming April 9 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CS 174: Web Programming April 21 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
Web Design HTML, Frontpage, DreamWeaver μέρος β ΠΡΥ019 - Πληροφορική Δρ.Βάσος Βασιλείου.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Nguyen Ich Cuong.  Course duration: 45’  Purpose: Present Introduction to JQuery  Targeted attendees: NICorp Trainee  Tests/quiz: Yes - 10’
JQuery UI. Slide 2 Introduction From the jQuery UI Home Page jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Positioning Objects with CSS and Tables
LibGuides Interface Customization Presented By: Christine Tobias ~ Kelly Sattler ~ Jenny Brandon Michigan State University Libraries.
CS 174: Web Programming October 28 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
COM621: Advanced Interactive Web Development Lecture 6 – JavaScript (cont.)
WebD Introduction to CSS By Manik Rastogi.
Introduction and HTML overview
HTML Basics.
The Box Model in CSS Web Design – Sec 4-8
20 Adobe Dreamweaver® CS3.
CMPE 280 Web UI Design and Development September 28 Class Meeting
The Box Model in CSS Web Design – Sec 4-8
CSS Layouts: Grouping Elements
CIS 136 Building Mobile Apps
JQuery UI.
Tutorial 6 Topic: jQuery and jQuery Mobile Li Xu
Chapter 5 Introduction to XHTML: Part 2
The Box Model in CSS Web Design – Sec 4-8
CMPE 280 Web UI Design and Development March 1 Class Meeting
Cascading Style Sheets
CMPE 280 Web UI Design and Development February 6 Class Meeting
IS333: MULTI-TIER APPLICATION DEVELOPMENT
HTML5 Level II Session III
JQuery UI Plug-ins, Object Models & the Window Object
Tutorial 6 Creating Dynamic Pages
HTML Level II (CyberAdvantage)
Cascading Style Sheets
Web Programming Language
Cascading Style Sheets™ (CSS)
Teaching slides Chapter 6.
SEEM4570 Tutorial 5: jQuery + jQuery Mobile
CMPE 280 Web UI Design and Development February 7 Class Meeting
CMPE 135: Object-Oriented Analysis and Design March 14 Class Meeting
JavaScript: BOM and DOM CS Programming Languages for Web Applications
Presentation transcript:

CMPE 280 Web UI Design and Development February 28 Class Meeting Department of Computer Engineering San Jose State University Spring 2019 Instructor: Ron Mak www.cs.sjsu.edu/~mak

The jQuery User Interface Toolkit The jQuery User Interface Toolkit is built on top of the jQuery library. New cross-platform UI features: UI elements: scrollbars tabs, date pickers, etc. Advanced user interaction drag and drop resize objects Theme templates control your application’s look and feel Icon library

The jQuery User Interface Toolkit, cont’d Build a modern application. That just happens to run inside a web browser. Add visual effects. Single-page application (SPA) Open source Download from http://jqueryui.com

Themes A jQuery theme is a visual rule set. Defines a particular look and feel. Implemented by a complex CSS document that you can download and link to your web pages. Visit the jQuery Theme Roller at http://jqueryui.com/themeroller/ Widgets (tool objects) Select and download themes. Modify themes or create new themes.

Drag an Object Call jQuery UI’s draggable() function on an object to enable it to be dragged with a mouse.

Drag an Object, cont’d <head> <title>Drag</title> <meta charset= "UTF-8" /> <script type="text/javascript" src="js/jquery.js"> </script> src="js/jquery-ui-lightness/jquery-ui.min.js"> src="js/drag.js"> </head> <body> <h1>Drag Demo</h1> <div id="dragMe"> <img src="images/Bristol.png" width="200" /> </div> </body> drag.html js/drag.js $(init); function init() { $("#dragMe").draggable(); }

UI Icons Each UI Toolkit download includes an images folder that contains the icon files. To insert an icon, create a span where icon-name is obtained from the Theme Roller. Hover the mouse over the desired icon to see its name. <span class="ui-icon icon-name"></span>

Resize an Object Call a jQuery object’s resizable() function on an object to enable it to be resized with a mouse. Add the following jQuery UI classes to the object: ui-widget ui-widget-content ui-corner-all

jQuery UI Toolkit Classes for CSS

Resize an Object, cont’d <head> <meta http-equiv="content-type" content="text/xml; charset=utf-8" /> <link rel = "stylesheet" type = "text/css" href = "css/jquery-ui-lightness/jquery-ui.min.css" /> href = "css/resize.css" /> <script type = "text/javascript" src = "js/jquery.js"> </script> src = "js/jquery-ui-lightness/jquery-ui.min.js"> src="js/resize.js"> <title>resize.html</title> </head> resize.html

Resize an Object, cont’d <body> <h1>Resize Demo</h1> <div id="resizeMe"> <h2> <span class="ui-icon ui-icon-heart"></span> Resize me <span class="ui-icon ui-icon-star"></span> </h2> <p> Drag a corner or side to resize. </p> </div> </body> resize.html

Resize an Object, cont’d js/resize.js $(init); function init() { $("#resizeMe").resizable(); $("div").addClass("ui-widget") .addClass("ui-widget-content") .addClass("ui-corner-all"); $(":header").addClass("ui-widget-header") } :header is a jQuery extension that matches all header elements.

Resize an Object, cont’d css/resize.css h1 {     text-align: center; } #resizeMe {     width: 200px;     height: 200px; #sample {     margin: 1em;

Drag and Drop an Object Call jQuery UI’s droppable() function on an object to enable it to be a drop target. Use the bind() function to bind drop-in and drop-out events to the object. Attach a callback function to each event. UI variable ui-draggable refers to the object that triggered the drop-in callback function.

Drag and Drop an Object, cont’d dragdrop.html <body> <h1>Drag and Drop Demo</h1> <div class="dragMe"> DRAG ME </div> <div id="target"> DROP HERE </body> </html>

Drag and Drop an Object, cont’d .dragMe {     width: 100px;     height: 100px;     border: 1px solid blue;     text-align: center;     background-color: white;     position: absolute;     z-index: 100; } #target {     width: 200px;     height: 200px;     border: 1px solid red;     left: 300px;     top: 100px;     z-index: 0; dragdrop.css

Drag and Drop an Object, cont’d js/dragdrop.js $(init); function init() { cloneDragMe(); $(".dragMe").draggable(); $("#target").droppable(); $("#target").bind("drop", highlightTarget); $("#target").bind("dropout", resetTarget); }

Drag and Drop an Object, cont’d js/dragdrop.js function highlightTarget(event, ui) { $("#target").addClass("ui-state-highlight") .html("Dropped ") .append(ui.draggable.text()); } function resetTarget(event, ui) $("#target").removeClass("ui-state-highlight") .html("Drop on me");

Drag and Drop an Object, cont’d js/dragdrop.js function cloneDragMe() { for (i = 1; i <= 4; i++){ zValue = 101 + i; xPos = 20*i; yPos = 80 + 20*i + "px"; $("div:first").clone() .insertAfter("div:first") .css("left", xPos) .css("top", yPos) .css("zIndex", zValue) .append(" #" + i); }

jQuery UI Widgets Popular jQuery UI widgets include: accordion tabs date picker slider selectable elements sortable lists dialog boxes

Accordion Widget Create an outer div to be the accordion widget. Create a heading for each collapsible element of the accordion widget. The headings are contained inside the outer div. Make all the headings at the same level. Follow each heading with an inner div to contain the contents of the collapsible element.

Accordion Widget, cont’d accordion.html <body> <h1>Accordion Demo</h1> <div id="accordion"> <h2>CMPE 180A Data Structures and Algorithms in C++</h2> <div> <p> Data representation and preprocessing, proximity, ... </p> <strong>Prerequisite:</strong> Admission into MS Computer Engineering or MS Software Engineering. </div> <h2>CMPE 226 Database Systems</h2> <div> ... </div> </body> Outer div Inner div Inner div

Accordion Widget, cont’d accordion.js $(init); function init() { $("#accordion").accordion(); }

Tabs Widget Create an outer div to be the tabs widget. The first element contained in the div must be an ordered or unordered list to serve as the tabs directory. Each list item is a local link to an inner div that contains the tab contents.

Tabs Widget, cont’d <body> <h1 class="ui-state-default">Tabs Demo</h1> <div id="tabs"> <ul>             <li><a href="#CMPE180A">CMPE 180A</a></li>             <li><a href="#CMPE226">CMPE 226</a></li>             <li><a href="#CMPE280">CMPE 280</a></li>             <li><a href="#CMPE295A">CMPE 295A</a></li> </ul> <div id="CMPE180A"> ... </div> <div id="CMPE226"> </body> tabs.html Outer div Tabs directory js/tabs.js Inner divs $(init); function init() { $("#tabs").tabs(); }

AJAX Tabs Use AJAX to obtain the contents of a tab. Specify the file to be loaded from the server as a link in the corresponding item in the tabs directory list.

AJAX Tabs, cont’d ajaxtabs.html <body>     <h1 class="ui-state-default">AJAX Tabs Demo</h1>     <div id="tabs">         <ul>             <li><a href="courses/CMPE180A.html">CMPE 180A</a></li>             <li><a href="courses/CMPE226.html">CMPE 226</a></li>             <li><a href="courses/CMPE280.html">CMPE 280</a></li>             <li><a href="courses/CMPE295A.html">CMPE 295A</a></li>         </ul>     </div> </body>

Date Picker Widget <input type="text" id="datePicker" /> widgets.html <input type="text" id="datePicker" /> $("#datePicker").datepicker(); js/widgets.js

Slider Widget <div id="slider"></div> widgets.html <div id="slider"></div> <div id="slideOutput">0</div> $("#slider").slider().bind("slide", reportSlider); ... function reportSlider() { var sliderVal = $("#slider").slider("value"); $("#slideOutput").html(sliderVal); } js/widgets.js

Selectable Widget <ul id="selectable"> <li>alpha</li> <li>beta</li> <li>gamma</li> <li>delta</li> </ul> widgets.html $("#selectable").selectable(); js/widgets.js

Sortable Widget <ul id="sortable"> <li>alpha</li> <li>beta</li> <li>gamma</li> <li>delta</li> </ul> widgets.html $("#sortable").sortable(); js/widgets.js

Dialog Widget <div id="dialog" title="my dialog"> <p> The dialog class allows you to have a movable sizable customized dialog box consistent the installed page theme. </p> </div> <input type="button" value="open dialog" onclick="openDialog()" /> value="close dialog" onclick="closeDialog()" /> widgets.html

Dialog Widget, cont’d function openDialog() { js/widgets.js function openDialog() { $("#dialog").dialog("open"); } function closeDialog() $("#dialog").dialog("close");

Assignment #4 Add jQuery and jQuery UI functionality to your web app. Pick and use a theme. Or create a new theme. Have at least one on-screen object that is: resizable dragged and dropped Use jQuery UI widgets: AJAX tabs (either node.js or Apache web server) at least two other interactive widgets

Assignment #4, cont’d Include a short informal report that points out the jQuery and jQuery UI features of your app. The purpose of each feature. How it behaves (you can use screenshots). How you implemented it. You may use other client-side libraries in your final project, but for this assignment, you must use at least jQuery and jQuery UI. Due Friday, March 8.