Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
7cbd4552
Commit
7cbd4552
authored
Aug 06, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug: remove several files function was not updated
parent
807973ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
23 deletions
+30
-23
OfficeJS/js/officejs.js
OfficeJS/js/officejs.js
+30
-23
No files found.
OfficeJS/js/officejs.js
View file @
7cbd4552
...
@@ -407,7 +407,6 @@
...
@@ -407,7 +407,6 @@
priv
.
data_object
.
currentSolver
=
realapp
;
priv
.
data_object
.
currentSolver
=
realapp
;
break
;
break
;
default
:
default
:
priv
.
data_object
.
currentEditor
=
null
;
break
;
break
;
}
}
priv
.
data_object
.
currentApp
=
realapp
;
priv
.
data_object
.
currentApp
=
realapp
;
...
@@ -531,7 +530,6 @@
...
@@ -531,7 +530,6 @@
priv
.
data_object
.
documentList
=
result
;
priv
.
data_object
.
documentList
=
result
;
priv
.
showDocumentListInsideLeftNavBar
();
priv
.
showDocumentListInsideLeftNavBar
();
priv
.
loading_object
.
end_getlist
();
priv
.
loading_object
.
end_getlist
();
// TODO : announce conflicts
if
(
typeof
callback
===
'
function
'
)
{
if
(
typeof
callback
===
'
function
'
)
{
callback
();
callback
();
}
}
...
@@ -585,7 +583,6 @@
...
@@ -585,7 +583,6 @@
that
.
getList
();
that
.
getList
();
if
(
error
.
conflict_object
)
{
if
(
error
.
conflict_object
)
{
priv
.
onConflict
(
error
.
conflict_object
);
priv
.
onConflict
(
error
.
conflict_object
);
// TODO : same for remove method
}
}
}
}
});
});
...
@@ -629,8 +626,10 @@
...
@@ -629,8 +626,10 @@
* Removes a document.
* Removes a document.
* @method remove
* @method remove
* @param {string} name The document name.
* @param {string} name The document name.
* @param {string} revision The document name.
*/
*/
that
.
remove
=
function
(
name
,
revision
)
{
that
.
remove
=
function
(
name
,
revision
)
{
console
.
log
(
arguments
);
if
(
!
priv
.
isJioSet
())
{
if
(
!
priv
.
isJioSet
())
{
console
.
error
(
'
No Jio set yet.
'
);
console
.
error
(
'
No Jio set yet.
'
);
return
;
return
;
...
@@ -638,7 +637,7 @@
...
@@ -638,7 +637,7 @@
priv
.
loading_object
.
remove
();
priv
.
loading_object
.
remove
();
priv
.
jio
.
removeDocument
(
priv
.
jio
.
removeDocument
(
name
,{
name
,{
revision
:
revision
,
revision
:
revision
||
'
last
'
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
priv
.
loading_object
.
end_remove
();
priv
.
loading_object
.
end_remove
();
that
.
getList
();
that
.
getList
();
...
@@ -651,7 +650,6 @@
...
@@ -651,7 +650,6 @@
that
.
getList
();
that
.
getList
();
if
(
error
.
conflict_object
)
{
if
(
error
.
conflict_object
)
{
priv
.
onConflict
(
error
.
conflict_object
);
priv
.
onConflict
(
error
.
conflict_object
);
// TODO : same for remove method
}
}
}
}
});
});
...
@@ -668,25 +666,29 @@
...
@@ -668,25 +666,29 @@
console
.
error
(
'
No Jio set yet.
'
);
console
.
error
(
'
No Jio set yet.
'
);
return
;
return
;
}
}
var
onResponse
=
function
(
result
)
{
cpt
+=
1
;
if
(
cpt
===
l
)
{
if
(
typeof
current_editor
.
update
!==
'
undefined
'
)
{
if
(
priv
.
data_object
.
currentEditor
!==
null
&&
current_editor
.
path
===
priv
.
data_object
.
currentEditor
.
path
)
{
that
.
getList
(
current_editor
.
update
);
}
else
{
that
.
getList
();
}
}
}
priv
.
loading_object
.
end_remove
();
};
for
(
i
=
0
,
l
=
documentarray
.
length
;
i
<
l
;
i
+=
1
)
{
for
(
i
=
0
,
l
=
documentarray
.
length
;
i
<
l
;
i
+=
1
)
{
priv
.
loading_object
.
remove
();
priv
.
loading_object
.
remove
();
priv
.
jio
.
removeDocument
(
priv
.
jio
.
removeDocument
(
documentarray
[
i
],
documentarray
[
i
],{
{
onResponse
:
function
(
result
)
{
revision
:
'
last
'
,
cpt
+=
1
;
success
:
onResponse
,
if
(
cpt
===
l
)
{
error
:
onResponse
if
(
typeof
current_editor
.
update
!==
'
undefined
'
)
{
});
if
(
priv
.
data_object
.
currentEditor
!==
null
&&
current_editor
.
path
===
priv
.
data_object
.
currentEditor
.
path
)
{
that
.
getList
(
current_editor
.
update
);
}
else
{
that
.
getList
();
}
}
}
priv
.
loading_object
.
end_remove
();
}});
}
}
};
};
...
@@ -709,9 +711,15 @@
...
@@ -709,9 +711,15 @@
// }
// }
};
};
/**
* Solve the conflict
* @method solveConflict
* @param {object} conflict_data The conflict object
* @param {string} data The new content of the new revision
*/
that
.
solveConflict
=
function
(
conflict_object
,
data
)
{
that
.
solveConflict
=
function
(
conflict_object
,
data
)
{
that
.
closeGadgetId
(
priv
.
data_object
.
currentSolver
.
gadget_id
);
that
.
closeGadgetId
(
priv
.
data_object
.
currentSolver
.
gadget_id
);
priv
.
data_object
.
currentSolver
=
null
;
priv
.
data_object
.
currentEditor
.
setContent
(
data
);
priv
.
data_object
.
currentEditor
.
setContent
(
data
);
priv
.
loading_object
.
save
();
priv
.
loading_object
.
save
();
conflict_object
.
solveConflict
(
conflict_object
.
solveConflict
(
...
@@ -731,7 +739,6 @@
...
@@ -731,7 +739,6 @@
that
.
getList
();
that
.
getList
();
if
(
error
.
conflict_object
)
{
if
(
error
.
conflict_object
)
{
priv
.
onConflict
(
error
.
conflict_object
);
priv
.
onConflict
(
error
.
conflict_object
);
// TODO : same for remove method
}
}
}
}
});
});
...
...
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