Project

General

Profile

Feature #1751

Documents tool: The frame for document preview should have adaptive height

Added by Ivan Tcholakov over 8 years ago. Updated about 3 years ago.

Status:
Needs more info
Priority:
High
Assignee:
-
Category:
-
Target version:
Start date:
22/07/2010
Due date:
% Done:

50%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
8

Description

When a html document is previewed, the containing it frame has a hard-coded height. The height must adapt itself to the actual browser's window height. A picture has been attached to this report.


Files

document_preview_within_a_frame.png (56.8 KB) document_preview_within_a_frame.png Ivan Tcholakov, 22/07/2010 02:10
screen1.png (43.8 KB) screen1.png Julio Montoya, 04/02/2011 18:51
screen2.png (11.2 KB) screen2.png Julio Montoya, 04/02/2011 18:51
showinframesfirefox.png (267 KB) showinframesfirefox.png Juan Carlos Raña Trabado, 07/02/2011 22:08

Related issues

Related to Chamilo LMS - Feature #323: Starting file in a directoryAssigned03/12/2009

Actions
Related to Chamilo LMS - Bug #2719: document show in frames doesn't run well on iexplorer 7 and 8Feature implemented01/02/2011

Actions
Related to Chamilo LMS - Bug #2541: embedded flash files through FLV Media Player are not displayed correctlyFeature implemented14/01/2011

Actions
Related to Chamilo LMS - Feature #3754: Remove yoxview for non-imagesBug resolved27/07/2011

Actions

History

#1

Updated by Yannick Warnier about 8 years ago

  • Target version set to 1.8.8 alpha
  • SCRUM pts - complexity changed from ? to 8

Agreed. There is some code doing that in the learning path already (newscorm/lp_view.php I guess)

#2

Updated by Christian Alberto Fasanando Flores about 8 years ago

  • Assignee set to Christian Alberto Fasanando Flores
#4

Updated by Christian Alberto Fasanando Flores about 8 years ago

  • Status changed from New to Feature implemented
  • % Done changed from 0 to 100
#5

Updated by Julio Montoya about 8 years ago

  • Status changed from Feature implemented to Assigned
  • % Done changed from 100 to 50
#6

Updated by Julio Montoya about 8 years ago

Julio Montoya wrote:

Christian Alberto Fasanando Flores wrote:

Fixed - http://code.google.com/p/chamilo/source/detail?r=2ac221cc24f1dd4514377a63eeb8ef169ab8d4f9&repo=classic

With that fix images are blocked

here the js is loaded so, no images
http://chamilodev.beeznest.com/main/document/showinframes.php?cidReq=CURSODEJULIO&file=%2Ftestitos.html

the html file is loaded normally no insertit js code

http://chamilodev.beeznest.com/courses/CURSODEJULIO/document/testitos.html?cidReq=CURSODEJULIO

I test it again and I can see the image but then the image disappears lol like a phantom ... i scroll down, change tab
tested with FF 3.6.13

#7

Updated by Christian Alberto Fasanando Flores about 8 years ago

I think the problem is with the image path, I created a document with a template and upload an image inserting to the page, I see the image from the template (path: /main/default_course_document/images/logo_dokeos.png) but I can't see the image I inserted. It is after "test test test" text, the path of the image is "shared_folder/christian.jpg", changing the path by "/courses/DEMOCHAMILO188ALPHA/document/shared_folder/christian.jpg" the image is shown.

The document example is http://chamilodev.beeznest.com/main/document/showinframes.php?cidReq=DEMOCHAMILO188ALPHA&file=%2Ftest-frame.html

#8

Updated by Ivan Tcholakov about 8 years ago

I think that too complex way for solving this task has been chosen. See the function:

    function insertIt() {
        var _y = document.getElementById("framediv");
        var _x = window.frames[0].document.body.innerHTML;
        _y.innerHTML = _x
    }

Actually, the document is loaded and interpreted by the browser twice which I think is not necessary. Also, I doubt that for all of the browsers innerHTML correctly refreshes the images and other embedded objects.

Currently I am working on the task #2541. There I have a problem with showing flv-videos on IE8 by using the showinframes.php view. When I deactivated this "double-loading" solution in my system then the video showed up.

It seems to me that this task can be solved in a pure css-way with some cross-browser tricks.

#9

Updated by Ivan Tcholakov about 8 years ago

And if you look at the code more carefully you will suspect that the "Terms and definitions" functionality is broken.

#10

Updated by Ivan Tcholakov about 8 years ago

Ivan Tcholakov wrote:

And if you look at the code more carefully you will suspect that the "Glossary terms and definitions" functionality is broken.

Sorry, I duplicated this post by a mistake.

#11

Updated by Ivan Tcholakov about 8 years ago

The Bug #2719 is caused by the movement of the document's source from its internal frame to the embracing div tag. But it is not only the visual glitch to be solved.

Now the browser interprets full-html (the document) inserted within full-html (the system). This is an obvious mistake.

The document must be shown within its own iframe, as it was before.

#12

Updated by Ivan Tcholakov about 8 years ago

And here is an explanation why relative links don't work. By using the function insertIt() the html source of the document is moved from the original document's URL to something like this example: http://localhost/chamilo-classic/main/document/showinframes.php?cidReq=TESTCOURSE&file=%2FTesting_the_FLV_Player_2.html . The link-base of the shown document gets different.

#13

Updated by Ivan Tcholakov about 8 years ago

I tested with 5 browsers the solution implemented by using the function updateContentHeight(), it works better in comparison with the current situation.

My suggestion is before releasing 1.8.8alpha we to revert the transaction http://code.google.com/p/chamilo/source/detail?r=2ac221cc24f1dd4514377a63eeb8ef169ab8d4f9&repo=classic .

#14

Updated by Juan Carlos Raña Trabado about 8 years ago

Ivan Tcholakov wrote:

I tested with 5 browsers the solution implemented by using the function updateContentHeight(), it works better in comparison with the current situation.

My suggestion is before releasing 1.8.8alpha we to revert the transaction http://code.google.com/p/chamilo/source/detail?r=2ac221cc24f1dd4514377a63eeb8ef169ab8d4f9&repo=classic .

I share the opinion of Ivan. If this fails it is better to leave it as it was to find a better solution

#15

Updated by Christian Alberto Fasanando Flores about 8 years ago

Ok, You are right, I already committed the changes. I did some changes in the updateContentHeight function and it was tested in firefox, ie6, ie7 ie8, safari, chrome and opera browsers. I see it works fine now.

Greetings :) .

http://code.google.com/p/chamilo/source/detail?r=8116ef5ba169b0bf7b5b6a8e6362e14bc3b637c7&repo=classic

#16

Updated by Juan Carlos Raña Trabado about 8 years ago

Christian Alberto Fasanando Flores wrote:

Ok, You are right, I already committed the changes. I did some changes in the updateContentHeight function and it was tested in firefox, ie6, ie7 ie8, safari, chrome and opera browsers. I see it works fine now.

Greetings :) .

http://code.google.com/p/chamilo/source/detail?r=8116ef5ba169b0bf7b5b6a8e6362e14bc3b637c7&repo=classic

in firefox the image is not full, it seems that the frame is spread wide but not high

#18

Updated by Yannick Warnier about 8 years ago

  • Target version changed from 1.8.8 alpha to 1.8.8 beta
#19

Updated by Julio Montoya almost 8 years ago

confirm that bug

#20

Updated by Yannick Warnier almost 8 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Christian Alberto Fasanando Flores)
#21

Updated by Yannick Warnier almost 8 years ago

  • Target version changed from 1.8.8 beta to 1.8.8.4
#22

Updated by Julio Montoya almost 8 years ago

  • Status changed from New to Needs more info

We add a js plugin called Yoxview to popup the HTML and image files as a preview, so this is no more a problem at least in 1.8.8.2

The problem will appear if we add a setting to disable this popup.

#23

Updated by Yannick Warnier over 7 years ago

  • Target version changed from 1.8.8.4 to 1.9 Stable

Yoxview has been disabled for now because it represents a non-perfect way of opening documents, which doesn't let all cases appear as they should (notably HTML + JS which expect an availability of a full-width screen width.

#24

Updated by Yannick Warnier almost 7 years ago

  • Target version changed from 1.9 Stable to 1.9.2
#25

Updated by Yannick Warnier over 6 years ago

  • Tracker changed from Bug to Feature
#26

Updated by Yannick Warnier over 6 years ago

  • Target version changed from 1.9.2 to 1.9.4
#27

Updated by Yannick Warnier about 6 years ago

  • Target version changed from 1.9.4 to 1.9.6
#28

Updated by Yannick Warnier about 6 years ago

  • Target version changed from 1.9.6 to 2.0
#29

Updated by Yannick Warnier about 3 years ago

  • Target version changed from 2.0 to 3.0

Also available in: Atom PDF