Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
client-js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Attention: Maintenance on monday 19.04.2021 from 07:00 - 13:00 (Gitlab and Mattermost are offline!)
Open sidebar
sally4-core
client-js
Commits
dd4949ec
Commit
dd4949ec
authored
Aug 17, 2014
by
Constantin Jucovschi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding text and repo
parent
eaba2556
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
134 additions
and
45 deletions
+134
-45
Cakefile
Cakefile
+4
-0
build.js
build.js
+8
-0
extlibs/info_kwarc_sally_comm_core.js
extlibs/info_kwarc_sally_comm_core.js
+0
-3
extlibs/info_kwarc_sally_comm_frames.js
extlibs/info_kwarc_sally_comm_frames.js
+54
-3
extlibs/info_kwarc_sally_comm_theo.js
extlibs/info_kwarc_sally_comm_theo.js
+0
-3
index.html
index.html
+18
-4
src/frames.coffee
src/frames.coffee
+49
-31
src/sally_client.coffee
src/sally_client.coffee
+1
-1
No files found.
Cakefile
View file @
dd4949ec
...
...
@@ -21,9 +21,13 @@ task 'build', 'Build the .js files', ->
exec
"cp target/compile/theo.js release/"
exec
"cp target/compile/sally_client.js release/"
exec
"cp target/compile/frames.js release/"
exec
"cp target/compile/text.js release/"
exec
"cp target/compile/repository.js release/"
task
'sbuild'
,
'Build the .js files'
,
->
exec
"r.js -o build.js optimize=none"
exec
"cp target/compile/theo.js release/"
exec
"cp target/compile/sally_client.js release/"
exec
"cp target/compile/frames.js release/"
exec
"cp target/compile/text.js release/"
exec
"cp target/compile/repository.js release/"
build.js
View file @
dd4949ec
...
...
@@ -16,5 +16,13 @@
name
:
"
frames
"
,
exclude
:
[
"
sally_client
"
]
},
{
name
:
"
repository
"
,
exclude
:
[
"
sally_client
"
]
},
{
name
:
"
text
"
,
exclude
:
[
"
sally_client
"
]
}
]
}
\ No newline at end of file
extlibs/info_kwarc_sally_comm_core.js
View file @
dd4949ec
...
...
@@ -53,6 +53,3 @@ var info_kwarc_sally_comm_core = {
typeInfo
:
'
info_kwarc_sally_comm_core.RegisterClientRequest
'
}]
};
if
(
typeof
window
===
'
undefined
'
)
{
module
.
exports
.
info_kwarc_sally_comm_core
=
info_kwarc_sally_comm_core
;
}
\ No newline at end of file
extlibs/info_kwarc_sally_comm_frames.js
View file @
dd4949ec
...
...
@@ -2,6 +2,48 @@ var info_kwarc_sally_comm_frames = {
name
:
'
info_kwarc_sally_comm_frames
'
,
defaultElementNamespaceURI
:
'
http:
\
/
\
/kwarc.info
\
/sally
\
/comm
\
/frames
'
,
typeInfos
:
[{
type
:
'
classInfo
'
,
localName
:
'
RemoveDocLevelService
'
,
propertyInfos
:
[{
type
:
'
element
'
,
name
:
'
id
'
,
elementName
:
'
id
'
,
typeInfo
:
'
String
'
}]
},
{
type
:
'
classInfo
'
,
localName
:
'
ExecDocLevelService
'
,
propertyInfos
:
[{
type
:
'
element
'
,
name
:
'
id
'
,
elementName
:
'
id
'
,
typeInfo
:
'
String
'
}]
},
{
type
:
'
classInfo
'
,
localName
:
'
NewDocLevelService
'
,
propertyInfos
:
[{
type
:
'
element
'
,
name
:
'
id
'
,
elementName
:
'
id
'
,
typeInfo
:
'
String
'
},
{
type
:
'
element
'
,
name
:
'
type
'
,
elementName
:
'
type
'
,
typeInfo
:
'
String
'
},
{
type
:
'
element
'
,
name
:
'
name
'
,
elementName
:
'
name
'
,
typeInfo
:
'
String
'
},
{
type
:
'
element
'
,
name
:
'
icon
'
,
elementName
:
'
icon
'
,
typeInfo
:
'
String
'
}]
},
{
type
:
'
classInfo
'
,
localName
:
'
ShowSallyFrameMenu
'
,
propertyInfos
:
[{
...
...
@@ -17,10 +59,19 @@ var info_kwarc_sally_comm_frames = {
}]
}],
elementInfos
:
[{
elementName
:
'
RemoveDocLevelService
'
,
typeInfo
:
'
info_kwarc_sally_comm_frames.RemoveDocLevelService
'
},
{
elementName
:
'
ExecDocLevelService
'
,
typeInfo
:
'
info_kwarc_sally_comm_frames.ExecDocLevelService
'
},
{
elementName
:
'
NewDocLevelService
'
,
typeInfo
:
'
info_kwarc_sally_comm_frames.NewDocLevelService
'
},
{
elementName
:
'
ShowSallyFrameMenu
'
,
typeInfo
:
'
info_kwarc_sally_comm_frames.ShowSallyFrameMenu
'
},
{
elementName
:
'
ListenDocLevelServices
'
,
typeInfo
:
'
AnyType
'
}]
};
if
(
typeof
window
===
'
undefined
'
)
{
module
.
exports
.
info_kwarc_sally_comm_frames
=
info_kwarc_sally_comm_frames
;
}
\ No newline at end of file
extlibs/info_kwarc_sally_comm_theo.js
View file @
dd4949ec
...
...
@@ -65,6 +65,3 @@ var info_kwarc_sally_comm_theo = {
typeInfo
:
'
info_kwarc_sally_comm_theo.OpenTheoWindowResponse
'
}]
};
if
(
typeof
window
===
'
undefined
'
)
{
module
.
exports
.
info_kwarc_sally_comm_theo
=
info_kwarc_sally_comm_theo
;
}
\ No newline at end of file
index.html
View file @
dd4949ec
...
...
@@ -9,18 +9,32 @@
require
.
config
(
{
baseUrl
:
"
release
"
baseUrl
:
"
release
"
,
paths
:
{
"
repository
"
:
"
../target/compile/repository
"
,
"
info_kwarc_sally_comm_repository
"
:
"
../target/compile/info_kwarc_sally_comm_repository
"
,
"
EventEmitter
"
:
"
../target/compile/EventEmitter
"
}
});
require
([
"
sally_client
"
,
"
theo
"
,
"
frames
"
],
function
(
SallyClient
,
Theo
,
Frames
)
{
require
([
"
sally_client
"
,
"
theo
"
,
"
frames
"
,
"
repository
"
],
function
(
SallyClient
,
Theo
,
Frames
,
Repository
)
{
var
theo
=
new
Theo
();
var
frames
=
new
Frames
();
var
repository
=
new
Repository
(
"
gl.kwarc.info/test/test
"
,
"
blah.txt
"
);
frames
.
on
(
"
NewDocLevelService
"
,
function
(
msg
)
{
frames
.
executeDocLevelService
(
msg
.
id
);
});
frames
.
on
(
"
RemoveDocLevelService
"
,
function
(
msg
)
{
console
.
log
(
msg
);
});
client
=
new
SallyClient
({
stompUrl
:
"
ws://localhost:61614
"
,
stompUser
:
"
webclient
"
,
stompPassword
:
"
webclient
"
});
client
.
register
([
theo
,
frames
],
"
env
"
+
Math
.
floor
(
Math
.
random
()
*
100000
),
function
()
{
frames
.
requestOnShowSallyFrames
(
100
,
100
);
client
.
register
([
theo
,
frames
,
repository
],
"
env
"
+
Math
.
floor
(
Math
.
random
()
*
100000
),
function
()
{
});
});
...
...
src/frames.coffee
View file @
dd4949ec
define
(
require
)
->
require
"sally_client"
require
"info_kwarc_sally_comm_frames"
context
=
new
Jsonix
.
Context
([
info_kwarc_sally_comm_frames
]);
marshaller
=
context
.
createMarshaller
();
unmarshaller
=
context
.
createUnmarshaller
();
createShowSallyFrameMenu
=
(
x
,
y
)
->
{
name
:
localPart
:
"ShowSallyFrameMenu"
namespaceURI
:
"http://kwarc.info/sally/comm/frames"
value
:
"posx"
:
x
,
"posy"
:
y
}
class
Frames
getName
:
()
->
"frames"
marshal
:
(
obj
)
->
marshaller
.
marshalString
(
obj
)
unmarshal
:
(
str
)
->
unmarshaller
.
unmarshalString
(
str
)
requestOnShowSallyFrames
:
(
x
,
y
)
->
@
send
(
createShowSallyFrameMenu
(
x
,
y
))
handleMessage
:
(
msg
)
->
\ No newline at end of file
require
"sally_client"
require
"info_kwarc_sally_comm_frames"
EventEmitter
=
require
"EventEmitter"
context
=
new
Jsonix
.
Context
([
info_kwarc_sally_comm_frames
]);
marshaller
=
context
.
createMarshaller
();
unmarshaller
=
context
.
createUnmarshaller
();
createShowSallyFrameMenu
=
(
x
,
y
)
->
{
name
:
localPart
:
"ShowSallyFrameMenu"
namespaceURI
:
"http://kwarc.info/sally/comm/frames"
value
:
"posx"
:
x
,
"posy"
:
y
}
executeDocLevelService
=
(
id
)
->
{
name
:
localPart
:
"ExecDocLevelService"
namespaceURI
:
"http://kwarc.info/sally/comm/frames"
value
:
"id"
:
id
}
class
Frames
extends
EventEmitter
constructor
:
()
->
@
services
=
{}
getName
:
()
->
"frames"
marshal
:
(
obj
)
->
marshaller
.
marshalString
(
obj
)
unmarshal
:
(
str
)
->
unmarshaller
.
unmarshalString
(
str
)
executeDocLevelService
:
(
id
)
->
@
send
(
executeDocLevelService
(
id
))
requestOnShowSallyFrames
:
(
x
,
y
)
->
@
send
(
createShowSallyFrameMenu
(
x
,
y
))
handleMessage
:
(
msg
,
sendBack
)
->
if
msg
.
name
.
localPart
==
"NewDocLevelService"
@
services
[
msg
.
value
.
id
]
=
msg
.
value
;
@
emit
(
"NewDocLevelService"
,
msg
.
value
)
if
msg
.
name
.
localPart
==
"RemoveDocLevelService"
delete
@
services
[
msg
.
value
.
id
];
@
emit
(
"RemoveDocLevelService"
,
msg
.
value
)
src/sally_client.coffee
View file @
dd4949ec
...
...
@@ -58,7 +58,7 @@ define (require) ->
@
privateQueue
=
"editor_tools_"
+
Math
.
floor
(
Math
.
random
()
*
100000
);
@
stompClient
.
subscribe
(
"/queue/"
+
@
privateQueue
,
(
msg
)
=>
namespace
=
xmlns
.
exec
(
msg
.
body
)[
3
];
console
.
log
(
namespace
)
console
.
log
(
namespace
,
msg
.
body
)
if
namespace
==
"core"
body
=
unmarshaller
.
unmarshalString
(
msg
.
body
)
if
body
.
name
.
localPart
==
"HeartbeatRequest"
...
...
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