Jump to content

how to override element.style ?


mazluta

Recommended Posts

image.thumb.png.87841b9205ff9cf8214e6e95f0068e7c.png

 

i tried 

procedure TViewerFrm.PDFViewFrameLoaded(Sender: TObject);
begin
  // download button
//  UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.'
//       + 'getElementById ("download").style.display = "none"');
//  UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.'
//       + 'getElementById ("secondaryDownload").style.display = "none"');

  // open file button
//  UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.'
//       + 'getElementById ("openFile").style.display = "none"');
//  UniSession.AddJS (PDFView.JSName + '.iframe.contentWindow.document.'
//       + 'getElementById ("secondaryOpenFile").style.display = "none"');

end;

it's fail.

so, i add some css to external css file

===========

/* #ext-element-6 #download{ */
.toolbar #download{  
  displaynone !important
}
 

and i thought that the name of the form is ext-element-6

but didnt work.

if i go to  inspection-> elemnt.system and set ther display:none it work.

so - how to i set the override to that  elemnt.system

thanks

 

 

 

 

Link to comment
Share on other sites

ok. on form create the toolbar is not implemented yet, so that why it fail

 

  If PdfLoad Then // PdfLoad is true - after load the file to PdfURL
  begin
    UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.getElementById("download").style.display = "none"');
    UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.getElementById("print").style.display = "none"');
    UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.getElementById("openFile").style.display = "none"');
  end;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...