logiclord / epubReader

epubReader is a standalone fluid infusion component. This project is about implementing a web based ePub reader component based on open web technologies for infusion framework
http://webbasedepubreader.blogspot.in
53 stars 16 forks source link

Bookmark and addNote is not working #16

Closed mann015 closed 11 years ago

mann015 commented 11 years ago

When i am trying to add a bookmark / add note to some text i t is showing that make i selection for note or make a selection for bookmark though i have already selected. Can u go through the error .

logiclord commented 11 years ago

Its very hard to say from this point but you might want to debug or provide with some more details. I try to get selected region at this(https://github.com/logiclord/epubReader/blob/master/js/epubReader.js#L435) point using infusion API.

dghag commented 11 years ago

I am also facing same issue?? Can you able to provide proper solution??

logiclord commented 11 years ago

Can you provide some more details ? What part worked and where it failed ?

dghag commented 11 years ago

I am trying to "Add bookmark" for selected text from "Bookmarks" tab. It is showing following message : "Please make a selection for bookmark". The same problem for "Add note" also.

logiclord commented 11 years ago

Just to clarify "selected" means selected via ePub reader selection tool not cursor selected text. Can you confirm which dom element is present at https://github.com/logiclord/epubReader/blob/master/js/epubReader.js#L390

sureshkardam commented 10 years ago

I am trying to "Add bookmark" for selected text from "Bookmarks" tab. It is showing following message : "Please make a selection for bookmark". The same problem for "Add note" also. not able to understand "selected via ePub reader selection tool" i'm not seeing anything like that.

logiclord commented 10 years ago

Hi Suresh,

I think you have not selected an element. In this reader a selected element means a selected dom object. Only a given level object can be selected so you need to select that element using control I have provided in the reader. I have used Selectable Property (http://wiki.fluidproject.org/display/docs/Tutorial+-+Keyboard+Accessibility+Plugin#Tutorial-KeyboardAccessibilityPlugin-Selectable) at https://github.com/logiclord/epubReader/blob/master/js/epubReader.js#L367 which allows you to navigate and select a part of current page.This is by design as we didn't had any standard way to support selection across touch, keyboard and mouse.

sureshkardam commented 10 years ago

Thanks Gaurav for the quick reply, I tried lot but not getting it correctly. When I am selecting any text and trying to book mark it throws exception. The below piece of code 'infusionAll.js 11771', I think I am facing problem. fluid.getScopedData = function(target, key) { var data = $(target).data(NAMESPACE_KEY); return data ? data[key] : undefined; }; This function returns undefined when I click on Bookmark button after selecting text. Let me know, if I am missing some thing here.

logiclord commented 10 years ago

Can you share a screenshot of how are you trying to select ?

sureshkardam commented 10 years ago

one is for selection and another one is after clicking the bookmark button by mouse selection after clicking the bookmark button

sureshkardam commented 10 years ago

Gaurav Sir, anything else you need from my side

sureshkardam commented 10 years ago

Dear Sir, Waiting for your response..

logiclord commented 10 years ago

Issue with your scenario is that you have not selected anything. Selection in this epub reader is different from selection made by dragging mouse cursor. You need to use selection mechanism of the reader. You need to activate the selection by hitting activation (space bar by default) then you will be able to selection using arrow keys.

I am not a sir, I am just Gaurav :)

-Gaurav

sureshkardam commented 10 years ago

Thanks Gaurav not Sir :), i was wondering is there anyway we can store that bookmarks and notes into our database, because everytime i refresh the browser it flush every notes and bookmark. i need to store them for future use customer wise. any help will be appreciated.

sureshkardam commented 10 years ago

Hello Gaurav ! this is Beyond this scope, but need your help when we open epub files which are created using pdf to epub converter(like Anicesoft EPUB Converter), it doesn't work with our framework. may be because of missing toc.ncx file. but all of your epubs files open well in the framework. what you used to make the epub file, if we are following the same for opening , we should follow the creation of files also. please let us know the procedure how you did that .

Regards suresh

logiclord commented 10 years ago

Example epubs i am using are not converted epub but freely available epub files.

sureshkardam commented 10 years ago

Hello Gaurav ! when i tried to open epub(other than your exapmle files) file it throw these errors, please see the screenshot

error

sureshkardam commented 10 years ago

Hello Gaurav! we are using these link for download sample code but its not working with our epub reader.

  1. http://www.snee.com/epubkidsbooks/
  2. https://code.google.com/p/epub-samples/downloads/list
  3. http://azardi.infogridpacific.com/resources.html
  4. http://www.adobe.com/in/products/digital-editions/eBook.html

Regards

logiclord commented 10 years ago

Can you make sure that these books are valid epub 2 format books http://validator.idpf.org/

sureshkardam commented 10 years ago

Hello Gaurav ! Nice to hear from your side, Approx. lost the hope to complete the project. here i'm sending you the report from the same link you provided. one for epub generated by the software and one in your expamles

PFA epubs_through_convertor your_expamle_epub

sureshkardam commented 10 years ago

i tried it before but i was not able to get 100 % ok file with it. one more thing can you suggest any paid software which can help us to build epub's file(which obviously cab be opened in your framework :)) Regards

logiclord commented 10 years ago

Hi Suresh,

I don't have much of information about software to convert ebooks to epub.

Thanks, Gaurav

sureshkardam commented 10 years ago

Thanks Gaurav ! did you checked the error screenshot(through Firebug) which i sent you before

Regards suresh