Popups, Dialogs, Widgets, Panels

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

JQuery Mobile. Benefits Required links Remember that we need to add the links to the head, in this order.
Twitter Bootstrap. Agenda What is it? Grids and Fluid layouts Globals and Typography Tables, Forms and Buttons Navigation Media and thumbnails Responsive.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Using HTML Tables.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Chapter 5 Working with Tables. Agenda Add a Table Assign a Table Border Adjust Cell Padding and Spacing Adjust Cell Width and Height Add Column Labels.
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Advanced CSS - Page Layout. Advanced CSS  Compound Selectors:  Is a Dreamweaver term, not a CSS term.  Describes more advanced types of selectors such.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Excel Part 2 Formatting a Workbook. XP Objectives Format text, numbers, and dates Change font colors and fill colors Merge a range into a single cell.
ITP 104.  While you can do things like this:  Better to use styles instead:
CO1552 – Web Application Development Lists, Special Characters, and Tables.
Web Technologies Website Development Trade & Industrial Education
Basic Responsive Design Techniques. Let’s take a look at this basic layout. It has a header and two columns of text, in a box that is centered on the.
Chapter 2 Developing a Web Page. A web page is composed of two distinct sections: –The head content –The body Creating Head Content and Setting Page Properties.
CIS 205—Web Design & Development Dreamweaver Chapter 5 Using HTML Tables to Lay Out a Page.
Adobe Dreamweaver CS3 Revealed CHAPTER FIVE: USING HTML TABLES TO LAY OUT A PAGE.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
Layout with Styles Castro Chapter 11. Tables vs. CSS You can produce “liquid layouts” (layouts that stretch as the browser is resized) using tables or.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
CONTROLLING Page layout
Positioning Objects with CSS and Tables
Header, Footer, and Navigation toolbars CIS 136 Building Mobile Apps 1.
Working with Cascading Style Sheets
CSCI 1720 W3.CSS – Part 1 East Tennessee State University Department of Computing CSCI 1720 Intermediate Web Design.
CSS Box Model.
CSS Box Model.
Create and edit web pages 4
Cascading Style Sheets Boxes
Creating Oracle Business Intelligence Interactive Dashboards
OVERVIEW Objectives Follow a design document to create a small personal Web site Follow a design document to create pages in a large commercial Web site.
Implementing Responsive Design
CSS Layouts: Positioning and Navbars
Organizing Content with Lists and Tables
CSS Layouts: Grouping Elements
Chapter 2 Developing a Web Page.
Working with Tables: Module A: Table Basics
Positioning Objects with CSS and Tables
CS 321: Human-Computer Interaction Design
Chapter A - Getting Started with Dreamweaver MX 2004
Objectives Format text, numbers, and dates
Tutorial 6 Topic: jQuery and jQuery Mobile Li Xu
LAB Work 02 MBA 61062: E-Commerce
Lists, Thumbnails, and Icons
Programming the Web using XHTML and JavaScript
Cascading Style Sheets
Unit I: Collecting Data with Forms
CSS Box Model.
Using HTML Tables SWBAT: - create tables using HTML
Tutorial 6 Creating Dynamic Pages
Formatting a Workbook Part 1
Responsive Framework.
DREAMWEAVER MX 2004 Chapter 3 Working with Tables
SEEM4570 Tutorial 5: jQuery + jQuery Mobile
Floating and Positioning
Introduction to HTML.
Buttons, Headers, Footers, and Navigation
CSS Box Model.
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Positioning Objects with CSS and Tables
Various mobile devices
Presentation transcript:

Popups, Dialogs, Widgets, Panels CIS 136 Building Mobile Apps

Pop-Ups and Dialogs

Pop-Ups and Dialogs Popups and dialogs are similar Dialogs they both overlay a part of a page with a small window useful when you want to display small text, photos, maps, text or other content Dialogs have a button for the user to close the window modal Popups (like a screen tip) the close button would be designed into the page view May not be modal Example of a dialog

Dialogs To create a dialog: use an <a> element with the data-rel=“dialog" attribute set the href of <a> to match the specified id of the page-view

Dialogs The linked to page isn’t limited to the little “x” to close it Can add other buttons to go to specific pages Can use the data-rel=“back” attribute to go back to the previous page-view, dismissing the dialog

Pop-Ups To create a popup, target a <div> in the same page-view: use an <a> element with the data-rel="popup" attribute add a <div> element with the data-role="popup" attribute to <div> specify an id for <div> set the href of <a> to match the specified id The content inside <div> is the actual content that will pop up when a user clicks on the link. <a href="#myPopup" data-rel="popup" >Show Popup</a> <div data-role="popup" id="myPopup">   <p>This is a simple popup.</p> </div>

Positioning Pop-Ups By default, popups will appear directly over the clicked element To control the position of the popup, use the data-position-to attribute on the link that is used to open the popup. There are three ways of positioning the popup: <a href="#myPopup1" data-rel="popup" class="ui-btn" data-position-to="window">Window</a> <a href="#myPopup2" data-rel="popup" class="ui-btn" data-position-to="#demo">id="demo"</a> <a href="#myPopup3" data-rel="popup" class="ui-btn" data-position-to="origin">Origin</a>

Closing Pop-Ups By default, popups can be closed by pressing outside the popup box If you do not want the popup to be closable by pressing outside the box, you can add the data-dismissible="false" attribute to the popup on the <div> tag You can also add a close button to the popup, placed either right or left, on the link tag itself <div data-role="popup" id="myPopup" class="ui-content" data-dismissible="false" style="max-width:400px;"> <a href="#" data-rel="back" class="ui-btn ui-btn-right">Close</a>

I am a popup.There is an arrow on my BOTTOM border Pop-Up Arrows To add an arrow to the popup's border, use the data-arrow attribute, and specify the value "l" (left), "t" (top), "r" (right) or "b" (bottom): <a href="#myPopup" data-rel="popup" class="ui-btn">Open Popup</a> <div data-role="popup" id="myPopup" class="ui-content" data-arrow=“b">   <p>There is an arrow on my BOTTOM border.</p> </div> I am a popup.There is an arrow on my BOTTOM border

Pop-Up Photos Can display images in pop-ups <a href="#myPopup" data-rel="popup" data-position-to="window"> <img src="skaret.jpg" alt="Skaret View" style="width:200px;"></a> <div data-role="popup" id="myPopup">   <img src="skaret.jpg" style="width:800px;height:400px;" alt="Skaret View"> </div>

Widgets Content formatting

Content Formatting Widgets that render Grids Collapsible content blocks Collapsible sets Responsive Tables Panels

Grids

Grids Grids are one of the few features that do not use data attributes work with grids by specifying CSS classes for the content Grids come in four styles: two-column three-column four-column five-column Best practices: keep in mind your target audience anything over two columns may be too thin on a mobile phone limit the columns to what you can see on a page view

Grids Grids are: 100% width completely invisible (no borders or backgrounds) don't have padding or margins

Grids To create a grid, use a <div> or <section> element that uses the ui-grid-? class, where ? will be either a, b, c, or d ui-grid-a represents a two-column grid ui-grid-b is a three-column grid what will ui-grid-c create?

Grids Next, within the <section> or <div> element use a div for each "cell" of the content the class for grid cells begin with ui-block-? In a two-column grid, ui-block-a would be used for the first cell and ui-block-b for the next In order to add more space between the content of the grid cells, add a class to the main div that specifies ui-content

Grid example

Grids To lay out a page with three columns, set the class for the top-level <section> or <div> to “ui-grid-b” and set the class for the third column to ui-block-c To add more separation: <section class=“ui-grid-b ui-content”>

Grids Grids do not have any concept of a row But to create multiple rows in a grid, repeat the blocks JQM knows to create a new row when it sees a block start over (as with the one marked ui-block-a). Left Top Right Top Left Bottom Right Bottom

Grids Buttons in grids get a little amount of margin space on the right and left Except for a full-width button Use grid solo to align a single button with buttons in other grids use a container with class ui-grid-solo and wrap the button in a div with class ui-block-a

Responsive Web Design Responsive web design (RWD) a design and technical approach adapts the layout and interaction of a site or app to work optimally across a wide range of: device resolutions screen densities interaction modes The framework has a number of responsive widgets: responsive grids reflow tables and column chooser tables Panels JQM’s latest versions include support for responsive design

Responsive grids Complex grids may not work depending on the size of the device A four-column grid might be OK on a tablet, but not on a phone It's not recommended to have many buttons with text on one row on small screens, because the text might get truncated

Responsive grids Add the ui-responsive class to an existing grid to make it responsive on a smaller device four-column layout now is a one-column layout instead because it stacked on a tablet, it would display as the original four-column design

Lets’ Practice Write the <div> content block to display a grid that looks like this: Bobby Unser Race Car Driver Jimmy Johnson NFL Coach, ret. Magic Basketball player

Lets’ Practice Bobby Unser Race Car Driver Jimmy Johnson NFL Coach, ret. Magic Basketball player

Collapsible Content Blocks

Collapsible Content Blocks Blocks of content that can be collapsed and expanded Provides a compact presentation of content Uses a data-role="collapsible” attribute

Collapsible Content Blocks in a <div> element add data-role="collapsible", include a title for the content, usually a header tag the title will become a clickable banner to expand and collapse the content within it Clicking on the + icon next to the title opens it, and can be clicked again to close it

Collapsible Content Blocks By default, JQM will collapse and hide the content to initialize the block as open instead of closed, add data-collapsed="false" to the initial div tag

Collapsible Content Blocks You can theme the content of the area that is collapsed Add a data-content-theme attribute, and data-iconpos attribute specify a background color to give depth

Collapsible Content Blocks By default collapsibles have an inset appearance Make them full width without corner styling add the data- inset="false" attribute to the element.

Collapsible Content Sets

Accordians take multiple collapsible regions and combine them into one region called an accordion Wrap multiple collapsible blocks in a new parent div tag, and use the data-role="collapsible-set" attribute to have the inner blocks be treated as one unit

Responsive Tables

Responsive Tables Generally, tables consist of a large amount of data This could take up an entire screen of a desktop browser On a mobile browser, this can be even more condensed

Responsive Tables to enable them to be responsive use thead and tbody blocks add a data-role="table" to the core table block add class ui-responsive becomes

Responsive Tables

Responsive Tables JQM has another powerful feature Can selectively filter the columns displayed to the user Add data-mode="columntoggle" to a table Add an ID attribute and value to the table

Responsive Tables By default, the column toggle widget will not allow you to select any columns

Responsive Tables To provide a list of columns, add a data-priority to each row header that you wish to make toggle-enabled You do not need to select every column, nor do you need to provide any specific order

Panels

Panels Panels sit on the left or right-hand side of a page and can be shown or hidden dynamically. Because of the limited "real estate" on mobile devices, panels are a nice way to hide navigation or other content until the user requests it

Panels add a new <div> block with a data-role of panel this is inside the div that defines your page this should be outside of the content region.

Panels To create panels, two panels are defined, one above and one below the content div. both have an ID inside the content div are two links—one for the left-hand side panel and one for the right-hand side panel.

Panels Panels are placed on the left-hand side by default to place one on the right-hand side, add the data-position attribute.

Panels Closing panels By default a panel will be closed if the user clicks anywhere outside the panel Panels will also be closed if the user swipes But because a user may not know this, it makes sense to also provide a manual way to close the panel, using a link with a data-rel value of close To control the close behavior of panels use data- swipeclose="false" and data-dismissable="false“ on the panel data-swipeclose="false” disables the swipe-to-close behavior data-dismissable="false" prevents the panel from closing by clicking outside the panel.

Panels Panels are displayed in one of three ways and can be customized using the data-display attribute The default value is reveal which pushes the content away by moving the main page content to the side revealing the panel overlay renders the panel on top of the main page content push acts as if the panel is pushing the content to the side