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
Show 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,11 +666,7 @@
...
@@ -668,11 +666,7 @@
console
.
error
(
'
No Jio set yet.
'
);
console
.
error
(
'
No Jio set yet.
'
);
return
;
return
;
}
}
for
(
i
=
0
,
l
=
documentarray
.
length
;
i
<
l
;
i
+=
1
)
{
var
onResponse
=
function
(
result
)
{
priv
.
loading_object
.
remove
();
priv
.
jio
.
removeDocument
(
documentarray
[
i
],
{
onResponse
:
function
(
result
)
{
cpt
+=
1
;
cpt
+=
1
;
if
(
cpt
===
l
)
{
if
(
cpt
===
l
)
{
if
(
typeof
current_editor
.
update
!==
'
undefined
'
)
{
if
(
typeof
current_editor
.
update
!==
'
undefined
'
)
{
...
@@ -686,7 +680,15 @@
...
@@ -686,7 +680,15 @@
}
}
}
}
priv
.
loading_object
.
end_remove
();
priv
.
loading_object
.
end_remove
();
}});
};
for
(
i
=
0
,
l
=
documentarray
.
length
;
i
<
l
;
i
+=
1
)
{
priv
.
loading_object
.
remove
();
priv
.
jio
.
removeDocument
(
documentarray
[
i
],{
revision
:
'
last
'
,
success
:
onResponse
,
error
:
onResponse
});
}
}
};
};
...
@@ -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