Skip to content

Commit

Permalink
Referring to font-awesome, removing unnecessary options from the TTS …
Browse files Browse the repository at this point in the history
…widget.
  • Loading branch information
Szaby Grünwald committed May 2, 2012
1 parent b583ace commit 80155fc
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 158 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ A tool for creating a user profile for a platform for users with cognitive disab
* jQuery + jQuery UI 1.9m5 - Basic UI widget set providing in-browser Accessibility, Themeability and Usability.
* Backbone.js - A model-view-controller framework for the client-side.
* Underscore.js - Javascript 1.9 added functionalities in older browsers.
* Using Font Awesome - http://fortawesome.github.com/Font-Awesome

## Development
Run the following command to keep compiling the coffeescript into javascript. It needs coffeescript installed to run.
Expand Down
55 changes: 12 additions & 43 deletions docs/ttswidget.html

Large diffs are not rendered by default.

60 changes: 0 additions & 60 deletions lib/capkomsymbolwidget/capkomsymbolwidget.js

This file was deleted.

10 changes: 3 additions & 7 deletions lib/capkomwizard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/ttswidget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE-edge,chrome=1" />

<link rel="stylesheet" href="../../css/font-awesome.css" />
<link rel="stylesheet" href="ttswidget.css" />
<link rel="stylesheet" href="../jquery/jquery-ui.min.css" />

Expand Down
4 changes: 3 additions & 1 deletion lib/ttswidget/index.html~
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<html>
<head>
<title>CapKom Wizard</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE-edge,chrome=1" />

<link rel="stylesheet" href="../../css/font-awesome.css" />
<link rel="stylesheet" href="ttswidget.css" />
<link rel="stylesheet" href="../jquery/jquery-ui.min.css" />

Expand Down Expand Up @@ -51,6 +52,7 @@
<section>
<h1>TTS widget</h1>
<h2>Demo</h2>
<i class="icon-arrow-right"/>
<div class="tts" lang="en">
Normally the text content of the element is taken.
</div>
Expand Down
48 changes: 8 additions & 40 deletions lib/ttswidget/ttswidget.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# `tts` attribute, it will be read instead of the text content of the element.
# The `lang` attribute specifies the language of interpretation. If no language
# is defined the default language is used. (see at `options`)
# Using Font Awesome - http://fortawesome.github.com/Font-Awesome

jQuery.widget "capkom.ttswidget",
# Options:
Expand All @@ -29,7 +30,7 @@ jQuery.widget "capkom.ttswidget",
# Type of the used backend.
backendType: "MARY"
# UI icon class to be used for the button
iconClass: "ui-icon-speaker"
# iconClass: "ui-icon-speaker"
# Spinner icon to be shown when still loading
spinnerUri: "spinner.gif"
# Dialog title
Expand All @@ -44,12 +45,12 @@ jQuery.widget "capkom.ttswidget",

_create: ->
# Add button to the element
@button = jQuery "<button class='tts-button'>#{@options.buttonLabel}</button>"
@button = jQuery "<button class='tts-button' alt='#{@options.buttonLabel}'><i class='icon-arrow-right'/></button>"
@button.prependTo @element
@button.button
text: false
icons:
primary: @options.iconClass
text: true
# icons:
# primary: @options.iconClass
@button.click (e) =>
e.preventDefault()
@talk()
Expand All @@ -66,49 +67,16 @@ jQuery.widget "capkom.ttswidget",
audioSnippet = null
if jQuery.browser.msie
audioSnippet = """
<OBJECT id='playera' height='60' width='230' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'>
<embed src='#{@_makeLink()}' name='playera' width='230' height='60' pluginspage='http://www.microsoft.com/windows/windowsmedia/' type='application/x-mplayer2' autoplay='true' showcontrols='1' fullScreen='false' DisplaySize='0' autostart='true' controls='All' controller='true'></embed>
<OBJECT id='playera' height='40' width='230' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'>
<embed src='#{@_makeLink()}' name='playera' width='230' height='40' pluginspage='http://www.microsoft.com/windows/windowsmedia/' type='application/x-mplayer2' autoplay='true' showcontrols='1' fullScreen='false' DisplaySize='0' autostart='true' controls='All' controller='true'></embed>
<PARAM NAME='AutoStart' VALUE='True'/>
<PARAM NAME='Balance' VALUE='False'/>
<PARAM NAME='DisplaySize' VALUE='True'/>
<PARAM NAME='Filename' VALUE='#{@_makeLink()}'/>
<PARAM NAME='Mute' VALUE='False'/>
<PARAM NAME='SelectionStart' VALUE='False'/>
<PARAM NAME='SelectionEnd' VALUE='False'/>
<PARAM NAME='SendPlayStateChangeEvents' VALUE='True'/>
<PARAM NAME='ShowControls' VALUE='True'/>
<PARAM NAME='ShowAudioControls' VALUE='True'/>
<PARAM NAME='ShowDisplay' VALUE='False'/>
<PARAM NAME='ShowPositionControls' VALUE='False'/>
<PARAM NAME='Volume' VALUE='1'/>
<PARAM NAME='AudioStream' VALUE='False'/>
<PARAM NAME='AutoSize' VALUE='True'/>
<PARAM NAME='AnimationAtStart' VALUE='False'/>
<PARAM NAME='AllowScan' VALUE='False'/>
<PARAM NAME='AllowChangeDisplaySize' VALUE='False'/>
<PARAM NAME='AutoRewind' VALUE='True'/>
<PARAM NAME='BaseURL' VALUE=''/>
<PARAM NAME='BufferingTime' VALUE='5'/>
<PARAM NAME='CaptioningID' VALUE=''/>
<PARAM NAME='ClickToPlay' VALUE='True'/>
<PARAM NAME='CursorType' VALUE='0'/>
<PARAM NAME='CurrentPosition' VALUE='True'/>
<PARAM NAME='CurrentMarker' VALUE='True'/>
<PARAM NAME='DefaultFrame' VALUE='mainframe'/>
<PARAM NAME='DisplayBackColor' VALUE='True'/>
<PARAM NAME='DisplayForeColor' VALUE='True'/>
<PARAM NAME='DisplayMode' VALUE='1'/>
<PARAM NAME='Enabled' VALUE='-1'/>
<PARAM NAME='EnableContextMenu' VALUE='False'/>
<PARAM NAME='EnablePositionControls' VALUE='False'/>
<PARAM NAME='EnableFullScreenControls' VALUE='False'/>
<PARAM NAME='EnableTracker' VALUE='False'/>
<PARAM NAME='InvokeURLs' VALUE='False'/>
<PARAM NAME='Language' VALUE='False'/>
<PARAM NAME='PlayCount' VALUE='1'/>
<PARAM NAME='PreviewMode' VALUE='False'/>
<PARAM NAME='ShowStatusBar' VALUE='False'/>
<PARAM NAME='TransparentAtStart' VALUE='False'/>
</OBJECT>
"""
else
Expand Down
10 changes: 3 additions & 7 deletions lib/ttswidget/ttswidget.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80155fc

Please sign in to comment.