Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
knipknap committed Oct 1, 2012
1 parent 73d3ea8 commit 6390c3f
Show file tree
Hide file tree
Showing 19 changed files with 1,606 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.c9revisions
1 change: 1 addition & 0 deletions AUTHORS
@@ -0,0 +1 @@
Samuel Abels <http://github.com/knipknap/>
661 changes: 661 additions & 0 deletions COPYING

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions ChangeLog
@@ -0,0 +1,3 @@
2012-10-01 Samuel Abels

* ChangeLog dummy to make some packager happy. Please use the Git ChangeLog.
33 changes: 15 additions & 18 deletions README.md
@@ -1,18 +1,15 @@
# README for a newly created project.

There are a couple of things you should do first, before you can use all of Git's power:

* Add a remote to this project: in the Cloud9 IDE command line, you can execute the following commands
`git remote add [remote name] [remote url (eg. 'git@github.com:/ajaxorg/node_chat')]` [Enter]
* Create new files inside your project
* Add them to to Git by executing the following command
`git add [file1, file2, file3, ...]` [Enter]
* Create a commit which can be pushed to the remote you just added
`git commit -m 'added new files'` [Enter]
* Push the commit the remote
`git push [remote name] master` [Enter]

That's it! If this doesn't work for you, please visit the excellent resources from [Github.com](http://help.github.com) and the [Pro Git](http://http://progit.org/book/) book.
If you can't find your answers there, feel free to ask us via Twitter (@cloud9ide), [mailing list](groups.google.com/group/cloud9-ide) or IRC (#cloud9ide on freenode).

Happy coding!
SpiffForm
==========
SpiffForm is a Javascript library implementing a form editor.

Contact
-------
Please use the Github issues:

https://github.com/knipknap/SpiffForm/issues

Usage
-----
A simple example is here:

https://github.com/knipknap/SpiffForm/blob/master/index.html
80 changes: 80 additions & 0 deletions default.css
@@ -0,0 +1,80 @@
body,
html {
margin: 0;
padding: 0;
color: #e8ecf0;
background: #85a2a2 url('spiffform/res/noise.png') repeat right top;
}

#wrap {
margin: 0 auto;
width: 1020px;
}

#header {
padding: .8em 2em;
margin-bottom: 15px;
background: #2a5350;
border-bottom: 1px solid #033;
}

#header h1 {
margin: 0;
padding: 0;
}

#center {
float: left;
width: 750px;
}

#sidebar {
color: #000;
float: right;
width: 270px;
}

#sidebar-elements h3 {
font-size: 1.3em;
color: #e8ecf0;
background-color: #448782;
padding: .4em;
margin: 0 5px;
}

.ui-elements {
list-style-type: none;
margin: 0;
padding-left: 10px;
padding-bottom: 10px;
}

.ui-elements li {
background-repeat: no-repeat;
background-position: 0 .5em;
padding: .5em 0 .5em 30px;
}

#ui-entry {
background-image: url('spiffform/res/entry.png');
}

#ui-text {
background-image: url('spiffform/res/textview.png');
}

#ui-button {
background-image: url('spiffform/res/button.png');
}

#ui-checkbox {
background-image: url('spiffform/res/checkbutton.png');
}

#ui-calendar {
background-image: url('spiffform/res/calendar.png');
}

#ui-combo {
background-image: url('spiffform/res/combo.png');
}
93 changes: 93 additions & 0 deletions index.html
@@ -0,0 +1,93 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<head>
<title>SpiffForm Demo</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="spiffform/res/spiffform.css" />
<link rel="stylesheet" href="default.css" />
<link rel="stylesheet" type="text/css"
href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css"/>
</head>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
<script src="spiffform/spiffform.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
spiffform_init($('#form'), $('#panel'));
spiffform_set_name($('#form'), 'Feedback Form Demo');
spiffform_set_subtitle($('#form'), 'Let us know what you think!');
var entry = spiffform_append($('#form'), 'spiffform-ui-entry');
entry.set_label('Complaint summary');
entry.set_text('Stop sending me emails');
var textbox = spiffform_append($('#form'), 'spiffform-ui-text');
textbox.set_label('Irrelevant text');
textbox.set_text('For the love of Jebus');
var checkbox = spiffform_append($('#form'), 'spiffform-ui-checkbox');
checkbox.set_label('Please send more spam to my inbox');
$(".ui-elements li").each(function() {
$(this).draggable({
"helper": function() {
return $(this).clone();
},
"cursorAt": {'right': -5},
"stop": function(event, ui) {
spiffform_insert_at(event, $(this).attr('name'));
}
});
});
});
</script>

<body>

<div id="header"><h1>SpiffForm Demo</h1></div>
<div id="wrap">
<div id="center">
<div id="form" class="spiffform">
</div>
</div>

<div id="sidebar">
<div id="panel" class="spiffform-panel"></div>

<div id="sidebar-elements">
<h3>Text Input</h3>
<ul class="ui-elements">
<li id="ui-entry" name="spiffform-ui-entry">Single Line Text</li>
<li id="ui-text" name="spiffform-ui-text">Text Box</li>
</ul>

<!-- h3>Buttons</h3>
<ul class="ui-elements">
<li id="ui-button" name="spiffform-ui-button">Submit Form</li>
</ul -->

<h3>Other Elements</h3>
<ul class="ui-elements">
<li id="ui-checkbox" name="spiffform-ui-checkbox">Checkbox</li>
<li id="ui-calendar" name="spiffform-ui-calendar">Date Selector</li>
<li id="ui-combo" name="spiffform-ui-combo">Dropdown Field</li>
</ul>
</div>
</div>
</div>

</body>
</html>
Binary file added spiffform/res/arrow-right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spiffform/res/button.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spiffform/res/calendar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spiffform/res/checkbutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spiffform/res/combo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spiffform/res/entry.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spiffform/res/fileselection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spiffform/res/noise.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6390c3f

Please sign in to comment.