Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
angular-emoji-popup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
angular-emoji-popup
Commits
6a8d7ef5
Commit
6a8d7ef5
authored
Dec 26, 2014
by
Madhur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more refactoring
parent
11629463
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
80 additions
and
41 deletions
+80
-41
.gitignore
.gitignore
+2
-1
Gruntfile.js
Gruntfile.js
+28
-7
bootstrap-theme.css.map
css/lib/bootstrap-theme.css.map
+0
-0
bootstrap-theme.min.css
css/lib/bootstrap-theme.min.css
+0
-0
bootstrap.css.map
css/lib/bootstrap.css.map
+0
-0
bootstrap.min.css
css/lib/bootstrap.min.css
+0
-0
index.html
index.html
+15
-4
emojiController.js
js/emojiController.js
+0
-14
emojiDirectives.js
js/emojiDirectives.js
+35
-0
util.js
js/util.js
+0
-15
No files found.
.gitignore
View file @
6a8d7ef5
...
...
@@ -4,4 +4,5 @@ _site/
node_modules
build
dist
jshint.log
\ No newline at end of file
jshint.log
src
\ No newline at end of file
Gruntfile.js
View file @
6a8d7ef5
...
...
@@ -20,7 +20,7 @@ module.exports = function(grunt)
},
files
:
{
src
:
[
'
dist/js/*.js
'
,
'
dist/css/*.css
'
]
src
:
[
'
dist/js/*.js
'
,
'
dist/css/*.css
'
,
'
src/css/*.css
'
,
'
src/js/*.js
'
]
}
}
},
...
...
@@ -49,6 +49,26 @@ module.exports = function(grunt)
src
:
'
img/*
'
,
dest
:
'
dist/
'
,
},
src
:
{
files
:
[
{
src
:
'
img/*
'
,
dest
:
'
src/
'
},
{
src
:
'
css/*.css
'
,
dest
:
'
src/
'
},
{
src
:
'
js/*.js
'
,
dest
:
'
src/
'
},
]
},
},
uglify
:
...
...
@@ -93,11 +113,10 @@ module.exports = function(grunt)
archive
:
'
emoji.zip
'
},
files
:
[
{
src
:
[
'
dist/**
'
],
dest
:
'
/
'
,
}
]
{
src
:
[
'
dist/**
'
],
dest
:
'
/
'
,
}]
}
}
});
...
...
@@ -114,7 +133,9 @@ module.exports = function(grunt)
// Default task(s).
grunt
.
registerTask
(
'
default
'
,
[
'
uglify
'
,
'
jshint
'
,
'
cssmin
'
,
'
usebanner
'
,
'
copy
'
,
'
compress
'
]);
grunt
.
registerTask
(
'
default
'
,
[
'
uglify
'
,
'
jshint
'
,
'
cssmin
'
,
'
usebanner
'
,
'
copy:main
'
,
'
compress
'
]);
grunt
.
registerTask
(
'
src
'
,
[
'
copy:src
'
,
'
usebanner
'
]);
grunt
.
registerTask
(
'
serve
'
,
[
'
connect
'
,
'
watch
'
]);
};
css/bootstrap-theme.css.map
→
css/
lib/
bootstrap-theme.css.map
View file @
6a8d7ef5
File moved
css/bootstrap-theme.min.css
→
css/
lib/
bootstrap-theme.min.css
View file @
6a8d7ef5
File moved
css/bootstrap.css.map
→
css/
lib/
bootstrap.css.map
View file @
6a8d7ef5
File moved
css/bootstrap.min.css
→
css/
lib/
bootstrap.min.css
View file @
6a8d7ef5
File moved
index.html
View file @
6a8d7ef5
...
...
@@ -4,8 +4,8 @@
<head>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
AngularJs Emoji Popup Demo
</title>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/bootstrap.min.css"
/>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/bootstrap-theme.min.css"
/>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/
lib/
bootstrap.min.css"
/>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/
lib/
bootstrap-theme.min.css"
/>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/nanoscroller.css"
/>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/emoji.css"
/>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/style.css"
/>
...
...
@@ -130,13 +130,24 @@
<script
type=
"text/javascript"
src=
"js/config.js"
></script>
<script
type=
"text/javascript"
src=
"js/util.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery.emojiarea.js"
></script>
<script
type=
"text/javascript"
src=
"js/emojiController.js"
></script>
<script
type=
"text/javascript"
src=
"js/emojiDirectives.js"
></script>
<script
type=
"text/javascript"
src=
"js/emojiFilters.js"
></script>
<script
type=
"text/javascript"
src=
"js/nanoscroller.js"
></script>
<!--<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="build/emoji.min.js"></script>-->
<script
type=
"text/javascript"
src=
"js/emojiController.js"
></script>
<script
type=
"text/javascript"
>
emojiApp
.
controller
(
'
emojiController
'
,
[
'
$scope
'
,
function
(
$scope
)
{
$scope
.
emojiMessage
=
{};
$scope
.
decodeType
=
'
colon
'
;
$scope
.
emojiMessage
.
replyToUser
=
function
()
{
alert
(
'
You typed
'
+
$scope
.
emojiMessage
.
messagetext
);
}
}]);
</script>
</body>
...
...
js/emojiController.js
deleted
100644 → 0
View file @
11629463
'
use strict
'
;
emojiApp
.
controller
(
'
emojiController
'
,
[
'
$scope
'
,
'
$log
'
,
function
(
$scope
,
$log
)
{
$scope
.
emojiMessage
=
{};
$scope
.
decodeType
=
'
colon
'
;
$scope
.
emojiMessage
.
replyToUser
=
function
()
{
alert
(
'
You typed
'
+
$scope
.
emojiMessage
.
messagetext
);
}
}]);
js/emojiDirectives.js
View file @
6a8d7ef5
...
...
@@ -257,3 +257,38 @@ emojiApp.directive('emojiForm', ['$timeout', '$http', '$interpolate','$compile',
});
}
}]);
emojiApp
.
directive
(
'
contenteditable
'
,
[
'
$sce
'
,
function
(
$sce
)
{
return
{
restrict
:
'
A
'
,
// only activate on element attribute
require
:
'
?ngModel
'
,
// get a hold of NgModelController
link
:
function
(
scope
,
element
,
attrs
,
ngModel
)
{
if
(
!
ngModel
)
return
;
// do nothing if no ng-model
// Specify how UI should be updated
ngModel
.
$render
=
function
()
{
element
.
html
(
ngModel
.
$viewValue
||
''
);
};
// Listen for change events to enable binding
element
.
on
(
'
blur keyup change
'
,
function
()
{
scope
.
$evalAsync
(
read
);
});
read
();
// initialize
// Write data to the model
function
read
()
{
var
html
=
element
.
html
();
// When we clear the content editable the browser leaves a <br>
// behind
// If strip-br attribute is provided then we strip this out
if
(
attrs
.
stripBr
&&
html
==
'
<br>
'
)
{
html
=
''
;
}
ngModel
.
$setViewValue
(
html
);
}
}
};
}
]);
js/util.js
View file @
6a8d7ef5
'
use strict
'
;
function
checkDragEvent
(
e
)
{
if
(
!
e
||
e
.
target
&&
(
e
.
target
.
tagName
==
'
IMG
'
||
e
.
target
.
tagName
==
'
A
'
))
return
false
;
if
(
e
.
dataTransfer
&&
e
.
dataTransfer
.
types
)
{
for
(
var
i
=
0
;
i
<
e
.
dataTransfer
.
types
.
length
;
i
++
)
{
if
(
e
.
dataTransfer
.
types
[
i
]
==
'
Files
'
)
{
return
true
;
}
}
}
else
{
return
true
;
}
return
false
;
}
function
cancelEvent
(
event
)
{
event
=
event
||
window
.
event
;
if
(
event
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment