mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
added mention when encountering unsupported field + some stylistic changes
This commit is contained in:
parent
f284a8aabe
commit
db10f6744a
@ -267,17 +267,15 @@ Viewer.prototype = {
|
|||||||
var r = elements[i];
|
var r = elements[i];
|
||||||
|
|
||||||
r.addEventListener('click', function() {
|
r.addEventListener('click', function() {
|
||||||
if(this.className.search("checked") == -1)
|
if(!this.classList.contains("checked"))
|
||||||
this.className += " checked";
|
this.classList.add("checked");
|
||||||
else
|
else
|
||||||
this.className = "ir";
|
this.classList.remove("checked");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
init_after_loading_content : function() {
|
init_after_loading_content : function() {
|
||||||
this.initialize_radio_button();
|
|
||||||
|
|
||||||
this.sidebar = document.getElementById(this.config['sidebar_id']);
|
this.sidebar = document.getElementById(this.config['sidebar_id']);
|
||||||
this.outline = document.getElementById(this.config['outline_id']);
|
this.outline = document.getElementById(this.config['outline_id']);
|
||||||
this.container = document.getElementById(this.config['container_id']);
|
this.container = document.getElementById(this.config['container_id']);
|
||||||
@ -329,6 +327,7 @@ Viewer.prototype = {
|
|||||||
ele.addEventListener('click', self.link_handler.bind(self), false);
|
ele.addEventListener('click', self.link_handler.bind(self), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.initialize_radio_button();
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -44,30 +44,34 @@ void HTMLRenderer::process_form(ofstream & out)
|
|||||||
{
|
{
|
||||||
font_size = height / 2;
|
font_size = height / 2;
|
||||||
|
|
||||||
out
|
out << "<input id=\"text-" << pageNum << "-" << i
|
||||||
<< "<input id=\"text-" << pageNum << "-"
|
<< "\" class=\"" << CSS::INPUT_TEXT_CN
|
||||||
<< i << "\" type=\"text\" value=\"\""
|
<< "\" type=\"text\" value=\"\""
|
||||||
<< " style=\"position: absolute; left: " << x1
|
<< " style=\"position: absolute; left: " << x1
|
||||||
<< "px; bottom: " << y1 << "px;"
|
<< "px; bottom: " << y1 << "px;"
|
||||||
<< " width: " << width << "px; height: " << std::to_string(height)
|
<< " width: " << width << "px; height: " << std::to_string(height)
|
||||||
<< "px; line-height: " << std::to_string(height) << "px; font-size: "
|
<< "px; line-height: " << std::to_string(height) << "px; font-size: "
|
||||||
<< font_size << "px;\" class=\""
|
<< font_size << "px;\" />" << endl;
|
||||||
<< CSS::INPUT_TEXT_CN << "\" />" << endl;
|
|
||||||
}
|
}
|
||||||
|
else if(w->getType() == formButton)
|
||||||
if(w->getType() == formButton)
|
|
||||||
{
|
{
|
||||||
|
//Ideally would check w->getButtonType()
|
||||||
|
//for more specific rendering
|
||||||
width += 3;
|
width += 3;
|
||||||
height += 3;
|
height += 3;
|
||||||
|
|
||||||
out
|
out << "<div id=\"cb-" << pageNum << "-" << i
|
||||||
<< "<div id=\"cb-" << pageNum << "-" << i << "\""
|
<< "\" class=\"" << CSS::INPUT_RADIO_CN
|
||||||
<< " style=\"position: absolute; left: " << x1
|
<< "\" style=\"position: absolute; left: " << x1
|
||||||
<< "px; bottom: " << y1 << "px;"
|
<< "px; bottom: " << y1 << "px;"
|
||||||
<< " width: " << width << "px; height: "
|
<< " width: " << width << "px; height: "
|
||||||
<< std::to_string(height) << "px; background-size: cover;\" class=\""
|
<< std::to_string(height) << "px; background-size: cover;\" ></div>" << endl;
|
||||||
<< CSS::INPUT_RADIO_CN << "\"></div>" << endl;
|
}
|
||||||
|
else if(w->getType() == formChoice ||
|
||||||
|
w->getType() == formSignature ||
|
||||||
|
w->getType() == formUndef)
|
||||||
|
{
|
||||||
|
cerr << "Unsupported form field detected" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user