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
abfad1ff
Commit
abfad1ff
authored
Dec 19, 2014
by
Madhur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smiley appearing
parent
32abc202
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
45 deletions
+100
-45
style.css
css/style.css
+5
-0
blank.gif
img/blank.gif
+0
-0
index.html
index.html
+26
-12
app.js
js/app.js
+63
-26
config.js
js/config.js
+3
-6
jquery.emojiarea.js
js/jquery.emojiarea.js
+3
-1
No files found.
css/style.css
View file @
abfad1ff
.form-control
{
width
:
500px
;
}
.form-control
:focus
{
border-color
:
#66afe9
;
outline
:
0
;
...
...
img/blank.gif
0 → 100644
View file @
abfad1ff
49 Bytes
index.html
View file @
abfad1ff
<html
ng-app=
"emojiApp"
>
<head>
<title>
Angular Emoji
</title>
<title>
Angular Emoji
</title>
<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"
/>
<link
type=
"text/stylesheet"
rel=
"stylesheet"
href=
"css/style.css"
/>
</head>
<body
ng-controller=
"emojiController"
>
<!--<h1>Angular Emoji Popup</h1>-->
<p/>
<p/>
<p/>
<p/>
<!--<h1>Angular Emoji Popup</h1>-->
<p/>
<p/>
<p/>
<p/>
<div
my-form
class=
"myform"
>
<textarea
id=
"messageInput"
ng-enter=
"replyToUser()"
ng-model=
"messagetext"
placeholder=
"Write a message..."
class=
"ng-untouched ng-valid ng-dirty ng-valid-parse"
style=
"display: none;"
></textarea>
<div
style=
"margin-right:10px;margin-top:5px;"
class=
"im_emoji_btn"
id=
"emojibtn"
style=
"cursor:pointer"
>
<i
class=
"icon icon-emoji"
style=
"cursor:pointer; margin-left:20px;margin-top:10px;"
></i>
</div>
<div
style=
"margin-right:10px;margin-top:5px;"
class=
"im_emoji_btn"
id=
"emojibtn"
style=
"cursor:pointer"
>
<i
class=
"icon icon-emoji"
style=
"cursor:pointer; margin-left:20px;margin-top:10px;"
></i>
</div>
<br/>
<span
style=
"float:clear"
></span>
<div>
String with Colons:
</div>
<div>
<input
class=
"form-control"
ng-model=
"messagetext"
>
</div>
<div>
String with UTF Chars: (Will not display fine in input box)
</div>
<div>
<input
class=
"form-control"
ng-model=
"messagetext"
>
</div>
</div>
<script
type=
"text/javascript"
src=
"js/angular.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.11.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/emoji.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery.emojiarea.js"
></script>
<script
type=
"text/javascript"
src=
"js/app.js"
></script>
<script
type=
"text/javascript"
src=
"js/config.js"
></script>
<script
type=
"text/javascript"
src=
"js/config.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/nanoscroller.js"
></script>
...
...
js/app.js
View file @
abfad1ff
'
use strict
'
;
var
emojiApp
=
angular
.
module
(
"
emojiApp
"
,
[]);
emojiApp
.
config
([
'
ConfigProvider
'
,
function
(
ConfigProvider
)
{
var
icons
=
{},
reverseIcons
=
{},
i
,
j
,
hex
,
name
,
dataItem
,
row
,
column
,
totalColumns
;
for
(
j
=
0
;
j
<
Config
.
EmojiCategories
.
length
;
j
++
)
{
totalColumns
=
Config
.
EmojiCategorySpritesheetDimens
[
j
][
1
];
for
(
i
=
0
;
i
<
Config
.
EmojiCategories
[
j
].
length
;
i
++
)
{
dataItem
=
Config
.
Emoji
[
Config
.
EmojiCategories
[
j
][
i
]];
name
=
dataItem
[
1
][
0
];
row
=
Math
.
floor
(
i
/
totalColumns
);
column
=
(
i
%
totalColumns
);
icons
[
'
:
'
+
name
+
'
:
'
]
=
[
j
,
row
,
column
,
'
:
'
+
name
+
'
:
'
];
reverseIcons
[
name
]
=
dataItem
[
0
];
}
}
$
.
emojiarea
.
spritesheetPath
=
'
/img/emojisprite_!.png
'
;
$
.
emojiarea
.
spritesheetDimens
=
Config
.
EmojiCategorySpritesheetDimens
;
$
.
emojiarea
.
iconSize
=
20
;
$
.
emojiarea
.
icons
=
icons
;
$
.
emojiarea
.
reverseIcons
=
reverseIcons
;
}]);
\ No newline at end of file
var
emojiApp
=
angular
.
module
(
"
emojiApp
"
,
[]);
emojiApp
.
config
(
function
(
ConfigProvider
)
{
var
Config
=
ConfigProvider
.
$get
();
var
icons
=
{},
reverseIcons
=
{},
i
,
j
,
hex
,
name
,
dataItem
,
row
,
column
,
totalColumns
;
for
(
j
=
0
;
j
<
Config
.
EmojiCategories
.
length
;
j
++
)
{
totalColumns
=
Config
.
EmojiCategorySpritesheetDimens
[
j
][
1
];
for
(
i
=
0
;
i
<
Config
.
EmojiCategories
[
j
].
length
;
i
++
)
{
dataItem
=
Config
.
Emoji
[
Config
.
EmojiCategories
[
j
][
i
]];
name
=
dataItem
[
1
][
0
];
row
=
Math
.
floor
(
i
/
totalColumns
);
column
=
(
i
%
totalColumns
);
icons
[
'
:
'
+
name
+
'
:
'
]
=
[
j
,
row
,
column
,
'
:
'
+
name
+
'
:
'
];
reverseIcons
[
name
]
=
dataItem
[
0
];
}
}
$
.
emojiarea
.
spritesheetPath
=
'
/img/emojisprite_!.png
'
;
$
.
emojiarea
.
spritesheetDimens
=
Config
.
EmojiCategorySpritesheetDimens
;
$
.
emojiarea
.
iconSize
=
20
;
$
.
emojiarea
.
icons
=
icons
;
$
.
emojiarea
.
reverseIcons
=
reverseIcons
;
});
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
)
{
event
=
event
.
originalEvent
||
event
;
if
(
event
.
stopPropagation
)
event
.
stopPropagation
();
if
(
event
.
preventDefault
)
event
.
preventDefault
();
}
return
false
;
}
js/config.js
View file @
abfad1ff
'
use strict
'
;
emojiApp
.
provider
(
'
ConfigProvider
'
,
function
()
emojiApp
.
provider
(
'
Config
'
,
function
()
{
var
Config
=
{};
Config
.
Emoji
=
{
...
...
@@ -3479,11 +3480,6 @@ emojiApp.provider('ConfigProvider', function()
};
});
//ConfigStorage
(
function
(
window
)
{
...
...
@@ -3671,4 +3667,5 @@ emojiApp.provider('ConfigProvider', function()
remove
:
storageRemoveValue
};
})(
this
);
js/jquery.emojiarea.js
View file @
abfad1ff
...
...
@@ -26,6 +26,8 @@
var
TAGS_BLOCK
=
[
'
p
'
,
'
div
'
,
'
pre
'
,
'
form
'
];
var
KEY_ESC
=
27
;
var
KEY_TAB
=
9
;
var
Config
=
{};
Config
.
Mobile
=
false
;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
...
...
@@ -274,7 +276,7 @@
+
xoffset
+
'
px
'
+
yoffset
+
'
px no-repeat;
'
;
style
+=
'
background-size:
'
+
scaledWidth
+
'
px
'
+
scaledHeight
+
'
px;
'
;
return
'
<img src="/
chat-dashboard/images
/blank.gif" class="img" style="
'
return
'
<img src="/
img
/blank.gif" class="img" style="
'
+
style
+
'
" alt="
'
+
util
.
htmlEntities
(
name
)
+
'
">
'
;
};
...
...
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