renamed project to angular-contenteditable. moved a few files around, too

fix-space-nbsp
Dmitri Akatov 11 years ago
parent 29cf4d2859
commit 45a9b82f3f

@ -7,6 +7,7 @@ module.exports = (grunt) ->
meta:
src: 'src'
test: 'test'
target: 'lib/<%= pkg.name %>.js'
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
@ -25,21 +26,21 @@ module.exports = (grunt) ->
files: src: ['Gruntfile.coffee']
coffee: src:
files:
'<%= pkg.name %>.js': [
'<%= meta.target %>': [
'<%= meta.src %>/**/*.coffee'
]
karma:
# unit: configFile: 'config/karma-unit.coffee'
e2e: configFile: 'config/karma-e2e.coffee'
# unit_ci:
# configFile: 'config/karma-unit.coffee'
# singleRun: true
# browsers: ['PhantomJS']
unit: configFile: 'test/config-unit.coffee'
e2e: configFile: 'test/config-e2e.coffee'
unit_ci:
configFile: 'test/config-unit.coffee'
singleRun: true
browsers: ['PhantomJS']
e2e_ci:
configFile: 'config/karma-e2e.coffee'
configFile: 'test/config-e2e.coffee'
singleRun: true
browsers: ['PhantomJS']
jshint: target: ['<%= pkg.name %>.js']
jshint: target: ['<%= meta.target %>']
require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks

@ -1,4 +1,4 @@
{ "name": "radians"
{ "name": "angular-contenteditable"
, "version": "0.0.0"
, "main": "angular-radians.js"
, "ignore":
@ -6,8 +6,6 @@
, "Gruntfile.coffee"
, "package.json"
, "components"
, "config"
, "examples"
, "node_modules"
, "src"
, "test"

@ -1,8 +1,3 @@
(function() {
angular.module('radians', ['radians.contenteditable']);
}).call(this);
(function() {
var escapeRegexp, noImg;
@ -14,7 +9,7 @@
return str.replace(/<img[^>]*>/g, '');
};
angular.module('radians.contenteditable', []).directive('contenteditable', function() {
angular.module('contenteditable', []).directive('contenteditable', function() {
return {
require: 'ngModel',
link: function(scope, elmt, attrs, ctrl) {

@ -1,8 +1,8 @@
{
"name": "angular-radians",
"name": "angular-contenteditable",
"version": "0.0.0",
"description": "angular extensions",
"main": "angular-radians.js",
"main": "lib/angular-radians.js",
"directories": {
"test": "test"
},

@ -6,7 +6,7 @@ escapeRegexp = (str) -> str.replace /([.?*+^$[\]\\(){}|-])/g, "\\$1"
# @param str a string possibly containing img tags
noImg = (str) -> str.replace /<img[^>]*>/g, ''
angular.module('radians.contenteditable', [])
angular.module('contenteditable', [])
.directive('contenteditable', ->
require: 'ngModel',
link: (scope, elmt, attrs, ctrl) ->

@ -1 +0,0 @@
angular.module('radians', ['radians.contenteditable'])

@ -6,15 +6,15 @@ toServe = [
'components/angular/angular.js'
'components/angular-bootstrap/ui-bootstrap.js'
'components/angular-bootstrap/ui-bootstrap-tpls.js'
'angular-radians.js'
'examples/simple.html'
'examples/typeahead1.html'
'examples/typeahead2.html'
'examples/typeahead3.html'
'examples/states.json'
'examples/img/ru.gif'
'examples/img/gb.gif'
'examples/img/us.gif'
'lib/angular-contenteditable.js'
'test/fixtures/simple.html'
'test/fixtures/typeahead1.html'
'test/fixtures/typeahead2.html'
'test/fixtures/typeahead3.html'
'test/fixtures/states.json'
'test/fixtures/img/ru.gif'
'test/fixtures/img/gb.gif'
'test/fixtures/img/us.gif'
]
toServe =

@ -18,7 +18,7 @@ angular.scenario.dsl 'contenteditable', ->
, ($window, $document, done) ->
elmt = $document.elements @name
elmt.html args
elmt.trigger 'change'
elmt.trigger 'input'
done(null, elmt.html(args))
angular.scenario.dsl 'scope', ->
@ -51,7 +51,7 @@ describe 'radians', ->
describe 'contenteditable', ->
describe 'simple application', ->
beforeEach ->
browser().navigateTo 'base/examples/simple.html'
browser().navigateTo 'base/test/fixtures/simple.html'
it 'should update the model from the view (simple text)', ->
contenteditable('#input').enter('abc')

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 260 B

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 361 B

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B

@ -3,11 +3,11 @@
<head>
<title>Simple</title>
<!-- we need jquery for e2e testing -->
<script src="../components/jquery/jquery.js"></script>
<script src="../components/angular/angular.js"></script>
<script src="../angular-radians.js"></script>
<script src="../../components/jquery/jquery.js"></script>
<script src="../../components/angular/angular.js"></script>
<script src="../../lib/angular-contenteditable.js"></script>
<script>
angular.module('simple', ['radians'])
angular.module('simple', ['contenteditable'])
.controller('Ctrl', function($scope) {
$scope.model = "Initial stuff <b>with bold</b> <em>and italic</em> yay"
})

@ -2,14 +2,14 @@
<html lang="en" ng-app="typeahead">
<head>
<meta charset="utf-8">
<link href="../components/bootstrap-css/css/bootstrap.css" rel="stylesheet">
<script src="../components/jquery/jquery.js"></script>
<script src="../components/angular/angular.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="../angular-radians.js"></script>
<link href="../../components/bootstrap-css/css/bootstrap.css" rel="stylesheet">
<script src="../../components/jquery/jquery.js"></script>
<script src="../../components/angular/angular.js"></script>
<script src="../../components/angular-bootstrap/ui-bootstrap.js"></script>
<script src="../../components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="../../lib/angular-contenteditable.js"></script>
<script>
angular.module('typeahead', ['ui.bootstrap', 'radians'])
angular.module('typeahead', ['ui.bootstrap', 'contenteditable'])
.controller('TypeaheadCtrl', function ($scope) {
$scope.selected = undefined
$scope.states = ['<b>sweet home</b> Alabama', '<i>cold</i> Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']

@ -2,14 +2,14 @@
<html lang="en" ng-app="typeahead">
<head>
<meta charset="utf-8">
<link href="../components/bootstrap-css/css/bootstrap.css" rel="stylesheet">
<script src="../components/jquery/jquery.js"></script>
<script src="../components/angular/angular.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="../angular-radians.js"></script>
<link href="../../components/bootstrap-css/css/bootstrap.css" rel="stylesheet">
<script src="../../components/jquery/jquery.js"></script>
<script src="../../components/angular/angular.js"></script>
<script src="../../components/angular-bootstrap/ui-bootstrap.js"></script>
<script src="../../components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="../../lib/angular-contenteditable.js"></script>
<script>
angular.module('typeahead', ['ui.bootstrap', 'radians'])
angular.module('typeahead', ['ui.bootstrap', 'contenteditable'])
.controller('TypeaheadCtrl', function ($scope) {
$scope.selected = undefined
$scope.states =

@ -2,14 +2,14 @@
<html lang="en" ng-app="typeahead">
<head>
<meta charset="utf-8">
<link href="../components/bootstrap-css/css/bootstrap.css" rel="stylesheet">
<script src="../components/jquery/jquery.js"></script>
<script src="../components/angular/angular.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap.js"></script>
<script src="../components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="../angular-radians.js"></script>
<link href="../../components/bootstrap-css/css/bootstrap.css" rel="stylesheet">
<script src="../../components/jquery/jquery.js"></script>
<script src="../../components/angular/angular.js"></script>
<script src="../../components/angular-bootstrap/ui-bootstrap.js"></script>
<script src="../../components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="../../lib/angular-contenteditable.js"></script>
<script>
angular.module('typeahead', ['ui.bootstrap', 'radians'])
angular.module('typeahead', ['ui.bootstrap', 'contenteditable'])
.controller('TypeaheadCtrl', function($scope, $http, limitToFilter, ignoreImgFilter) {
$scope.selected = ""
$scope.states = function(query){